code: def add_partition(self, partition):
          
          assert(partition not in self._partitions)
          # Add partition to existing set
          self._partitions.add(partition)
          # Add broker to replica list
          partition.add_replica(self)
docs: Add partition to partition list.