code: def merge_partition_offsets(*partition_offsets):
      
      output = dict()
      for partition_offset in partition_offsets:
          for partition, offset in six.iteritems(partition_offset):
              prev_offset = output.get(partition, 0)
              output[partition] = max(prev_offset, offset)
      return output
docs: Merge the partition offsets of a single topic from multiple responses.
  
      :param partition_offsets: list of dict partition: offset
      :returns: dict partition: offset