def METHOD_NAME(self, fname, compress=True):
    """Save the data of the learner into a pickle file.
    Parameters
    ----------
    fname : str
        The filename into which to save the learner's data.
    compress : bool, default True
        Compress the data upon saving using 'gzip'. When saving
        using compression, one must load it with compression too.
    """
    data = self._get_data()
    METHOD_NAME(fname, data, compress)