def to_pickle(self, path='', filename=None):
        """Pickle (serialize) EegSubject object to disk.

        Keyword arguments:
        path -- path without filename to store pickled object
        filename -- filename to append to path, optional
        """

        if filename is None:
            filename = '{0.subject_id}.pkl'.format(self)
        filename = os.path.join(path, filename)
        pickle.dump(self, open(filename, 'w'), pickle.HIGHEST_PROTOCOL)
dataset/ETHPy150Open turambar/pyDatasets/pydatasets/uci/eeg.py/EegSubject.to_pickle/original