code: def get_preferred_partition(self, broker, sibling_distance):
          
          # Only partitions not having replica in broker are valid
          # Get best fit partition, based on avoiding partition from same topic
          # and partition with least siblings in destination-broker.
          eligible_partitions = self.partitions - broker.partitions
          if eligible_partitions:
              pref_partition = min(
                  eligible_partitions,
                  key=lambda source_partition:
                      sibling_distance[source_partition.topic],
              )
              return pref_partition
          else:
              return None
docs: The preferred partition belongs to the topic with the minimum
          (also negative) distance between destination and source.
  
          :param broker:  Destination broker
          :param sibling_distance: dict {topic: distance} negative distance should
              mean that destination broker has got less partition of a certain topic
              than source self.
          :returns: A partition or None if no eligible partitions are available