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