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)
def count_replica ( self , partition ) : return sum ( 1 for b in partition . replicas if b in self . brokers )
Return count of replicas of given partition.