code: def _create_broker(self, broker_id, metadata=None):
          
          broker = Broker(broker_id, metadata)
          if not metadata:
              broker.mark_inactive()
          rg_id = self.extract_group(broker)
          group = self.rgs.setdefault(rg_id, ReplicationGroup(rg_id))
          group.add_broker(broker)
          broker.replication_group = group
          return broker
docs: Create a broker object and assign to a replication group.
          A broker object with no metadata is considered inactive.
          An inactive broker may or may not belong to a group.