parameters: (events, stream=None, Dumper=Dumper,
          canonical=None, indent=None, width=None,
          allow_unicode=None, line_break=None)
docstring: Emit YAML parsing events into a stream.
      If stream is None, return the produced string instead.
docstring_summary: Emit YAML parsing events into a stream.
      If stream is None, return the produced string instead.
docstring_tokens: Emit YAML parsing events into a stream . If stream is None return the produced string instead .
function: def emit(events, stream=None, Dumper=Dumper,
          canonical=None, indent=None, width=None,
          allow_unicode=None, line_break=None):
      """
      Emit YAML parsing events into a stream.
      If stream is None, return the produced string instead.
      """
      getvalue = None
      if stream is None:
          stream = io.StringIO()
          getvalue = stream.getvalue
      dumper = Dumper(stream, canonical=canonical, indent=indent, width=width,
              allow_unicode=allow_unicode, line_break=line_break)
      try:
          for event in events:
              dumper.emit(event)
      finally:
          dumper.dispose()
      if getvalue:
          return getvalue()
function_tokens: def emit ( events , stream = None , Dumper = Dumper , canonical = None , indent = None , width = None , allow_unicode = None , line_break = None ) : getvalue = None if stream is None : stream = io . StringIO ( ) getvalue = stream . getvalue dumper = Dumper ( stream , canonical = canonical , indent = indent , width = width , allow_unicode = allow_unicode , line_break = line_break ) try : for event in events : dumper . emit ( event ) finally : dumper . dispose ( ) if getvalue : return getvalue ( )