code: def assignment(self):
          
          return {
              partition.name: [
                  self.brokers[bid].id for bid in self.replicas[pid]
              ]
              for pid, partition in enumerate(self.partitions)
          }
docs: Return the partition assignment that this state represents.