def represent_dict(dumper, data):
    """ Custom representer for empty dict object """
    if not data:
        return dumper.represent_data(None)
    else:
        return dumper.represent_dict(data.items())