def read(self, f):
        """
        Read method.

        Parameters
        ----------
        f : string
            Path to the .pkl file on disk.

        Returns
        -------
        PyBot state dictionary if the file exists; None otherwise.
        """
        if not os.path.exists(f):
            logging.info("%s does not exist." % f)
            return None

        logging.info("Retrieving state from %s." % f)
        fp = open(f)
        state = pickle.load(fp)
        fp.close()
        return state
dataset/ETHPy150Open magsol/pybot/pybot/storage.py/PickleStorage.read/original