code: def sort_by_distance_percentage(cls, consumer_offsets_metadata):
          
          sorted_offsets = sorted(
              list(consumer_offsets_metadata.items()),
              key=lambda topic_offsets1: sum(
                  [cls.percentage_distance(o.highmark, o.current) for o in topic_offsets1[1]]
              )
          )
          return OrderedDict(sorted_offsets)
docs: Receives a dict of (topic_name: ConsumerPartitionOffset) and returns an
          similar dict where the topics are sorted by average offset distance
          in percentage.