code: def dump(graphs, file, triples=False, cls=PENMANCodec, **kwargs):
      
      text = dumps(graphs, triples=triples, cls=cls, **kwargs)
  
      if hasattr(file, 'write'):
          print(text, file=file)
      else:
          with open(file, 'w') as fh:
              print(text, file=fh)
docs: Serialize each graph in *graphs* to PENMAN and write to *file*.
  
      Args:
          graphs: an iterable of Graph objects
          file: a filename or file-like object to write to
          triples: if True, write graphs as triples instead of as PENMAN
          cls: serialization codec class
          kwargs: keyword arguments passed to the constructor of *cls*