code: def safe_dump(data, stream=None, **kwds):
      
      return dump_all([data], stream, Dumper=SafeDumper, **kwds)
docs: Serialize a Python object into a YAML stream.
      Produce only basic YAML tags.
      If stream is None, return the produced string instead.