code: def create_from_file(self, file=None, fmt='gaf', skim=True, **args):
          
          if fmt is not None and not fmt.startswith('.'):
              fmt = '.{}'.format(fmt)
  
          d = {
              '.gaf' : GafParser,
              '.gpad' : GpadParser,
              '.hpoa' : HpoaParser,
          }
  
          if fmt is None:
              filename = file if isinstance(file, str) else file.name
              suffixes = pathlib.Path(filename).suffixes
              iterator = (fn() for ext, fn in d.items() if ext in suffixes)
          else:
              iterator = (fn() for ext, fn in d.items() if ext == fmt)
  
          try:
              parser = next(iterator)
          except StopIteration:
              logging.error("Format not recognized: {}".format(fmt))
  
          logging.info("Parsing {} with {}/{}".format(file, fmt, parser))
  
          if skim:
              results = parser.skim(file)
              return self.create_from_tuples(results, **args)
          else:
              assocs = parser.parse(file, skipheader=True)
              return self.create_from_assocs(assocs, **args)
docs: Creates from a file. If fmt is set to None then the file suffixes will
          be used to choose a parser.
  
          Arguments
          ---------
          file : str or file
              input file or filename
          fmt : str
              name of format e.g. gaf