def METHOD_NAME(self, data):
    if isinstance(data, (pd.DataFrame, pd.Series)):
        os.environ["MODIN_PERSISTENT_PICKLE"] = "True"
    with open(self._path, "wb") as pf:
        pickle.dump(data, pf)