code: def merge_offsets_metadata(topics, *offsets_responses):
      
      result = dict()
      for topic in topics:
          partition_offsets = [
              response[topic]
              for response in offsets_responses
              if topic in response
          ]
          result[topic] = merge_partition_offsets(*partition_offsets)
      return result
docs: Merge the offset metadata dictionaries from multiple responses.
  
      :param topics: list of topics
      :param offsets_responses: list of dict topic: partition: offset
      :returns: dict topic: partition: offset