code: def dump(destination, ms, single=False, pretty_print=False, **kwargs):
      
      text = dumps(ms,
                   single=single,
                   pretty_print=pretty_print,
                   **kwargs)
  
      if hasattr(destination, 'write'):
          print(text, file=destination)
      else:
          with open(destination, 'w') as fh:
              print(text, file=fh)
docs: Serialize Xmrs objects to the Prolog representation and write to a file.
  
      Args:
          destination: filename or file object where data will be written
          ms: an iterator of Xmrs objects to serialize (unless the
              *single* option is `True`)
          single: if `True`, treat *ms* as a single Xmrs object
              instead of as an iterator
          pretty_print: if `True`, add newlines and indentation