code: def load_frompickle(cls, fname, reload_object=False):
          
          if fname[-4:] != '.pkl':
              fname += '.pkl'
          with open(fname, 'rb') as f:
              tnet = pickle.load(f)
          if reload_object:
              reloadnet = teneto.TenetoBIDS(tnet.BIDS_dir, pipeline=tnet.pipeline, pipeline_subdir=tnet.pipeline_subdir, bids_tags=tnet.bids_tags,  bids_suffix=tnet.bids_suffix,
                                            bad_subjects=tnet.bad_subjects, confound_pipeline=tnet.confound_pipeline, raw_data_exists=tnet.raw_data_exists, njobs=tnet.njobs)
              reloadnet.histroy = tnet.history
              tnet = reloadnet
          return tnet
docs: Loaded saved instance of
  
          fname : str
              path to pickle object (output of TenetoBIDS.save_aspickle)
          reload_object : bool (default False)
              reloads object by calling teneto.TenetoBIDS (some information lost, for development)
  
          Returns
          -------
              self :
                  TenetoBIDS instance