code: def dump(config):
      
  
      return yaml.safe_dump(
          config.to_primitive(),
          default_flow_style=False,
          encoding='utf-8',
          allow_unicode=True)
docs: Dumps a stacker Config object as yaml.
  
      Args:
          config (:class:`Config`): the stacker Config object.
          stream (stream): an optional stream object to write to.
  
      Returns:
          str: the yaml formatted stacker Config.