def broker_metadata(self, broker_id):
        """Get BrokerMetadata

        Arguments:
            broker_id (int or str): node_id for a broker to check

        Returns:
            BrokerMetadata or None if not found
        """
        return (
            self._brokers.get(broker_id) or
            self._bootstrap_brokers.get(broker_id) or
            self._coordinator_brokers.get(broker_id)
        )
Get BrokerMetadata

        Arguments:
            broker_id (int or str): node_id for a broker to check

        Returns:
            BrokerMetadata or None if not found
        
kafka/cluster.py