code: def _decommission_brokers_in_group(self, group):
          
          try:
              group.rebalance_brokers()
          except EmptyReplicationGroupError:
              self.log.warning("No active brokers left in replication group %s", group)
          for broker in group.brokers:
              if broker.decommissioned and not broker.empty():
                  # In this case we need to reassign the remaining partitions
                  # to other replication groups
                  self.log.info(
                      "Broker %s can't be decommissioned within the same "
                      "replication group %s. Moving partitions to other "
                      "replication groups.",
                      broker,
                      broker.replication_group,
                  )
                  self._force_broker_decommission(broker)
                  # Broker should be empty now
                  if not broker.empty():
                      # Decommission may be impossible if there are not enough
                      # brokers to redistributed the replicas.
                      self.log.error(
                          "Could not decommission broker %s. "
                          "Partitions %s cannot be reassigned.",
                          broker,
                          broker.partitions,
                      )
                      raise BrokerDecommissionError("Broker decommission failed.")
docs: Decommission the marked brokers of a group.