def representer(dumper, data):
        """ 
        http://stackoverflow.com/a/14001707/4075339
        http://stackoverflow.com/a/21912744/4075339 
        """
        tag = yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG
        return dumper.represent_mapping(tag,list(data.todict().items()),flow_style=True)
http://stackoverflow.com/a/14001707/4075339
        http://stackoverflow.com/a/21912744/4075339