@classmethod
def to_yaml(cls, representer, data):
    """
        Convert a Python object to a representation node.
        """
    return representer.represent_yaml_object(cls.yaml_tag, data, cls,
        flow_style=cls.yaml_flow_style)
