code: def _parse_file(cls, path, pickle=False):
          
  
          fname = path
          if fname.endswith(".gz"):
              fname = path[:-3]
  
          if fname.endswith('.pkl'):
              #you asked for the pickled file. I'll give it to you
              log.debug("loading pickled file %s ..." % fname)
              return cPickle.load( open(fname, "rb") )
          elif os.path.isfile("%s.pkl" % fname):
              #there is a cached version I can give to you
              log.info("loading pickled file %s.pkl ..." % fname)
              if os.stat(path).st_mtime > os.stat("%s.pkl" % fname).st_mtime:
                  log.critical("*** pickled file %s.pkl is not up to date ***" % (path))
              return cPickle.load( open("%s.pkl" % fname, "rb") )
  
          data = fastLoadChain(path, cls._strfactory)
          if pickle and not os.path.isfile('%s.pkl' % fname):
              log.info("pckling to %s.pkl" % (fname))
              with open('%s.pkl' % fname, 'wb') as fd:
                  cPickle.dump(data, fd)
          return data
docs: parse a .chain file into a list of the type [(L{Chain}, arr, arr, arr) ...]
  
          :param fname: name of the file