def count_replica ( self , partition ) : return sum ( 1 for b in partition . replicas if b in self . brokers )
python count partitions of a number
Return count of replicas of given partition .
def count_replica(self, partition):
        """Return count of replicas of given partition."""
        return sum(1 for b in partition.replicas if b in self.brokers)