def nullify_offsets(offsets):
    """Modify offsets metadata so that the partition offsets
    have null payloads.

    :param offsets: dict {<topic>: {<partition>: <offset>}}
    :returns: a dict topic: partition: offset
    """
    result = {}
    for topic, partition_offsets in six.iteritems(offsets):
        result[topic] = _nullify_partition_offsets(partition_offsets)
    return result
Modify offsets metadata so that the partition offsets
    have null payloads.

    :param offsets: dict {<topic>: {<partition>: <offset>}}
    :returns: a dict topic: partition: offset