code: def Dump(obj):
    
    text = yaml.safe_dump(obj, default_flow_style=False, allow_unicode=True)
  
    if compatibility.PY2:
      text = text.decode("utf-8")
  
    return text
docs: Stringifies a Python object into its YAML representation.
  
    Args:
      obj: A Python object to convert to YAML.
  
    Returns:
      A YAML representation of the given object.