code: def to_yaml(cls, dumper, data):
          
          return dumper.represent_yaml_object(cls.yaml_tag, data, cls,
                  flow_style=cls.yaml_flow_style)
docs: Convert a Python object to a representation node.