'Return set of partitions with known leaders
Arguments:
topic (str): topic to check for partitions
Returns:
set: {partition (int), ...}'

def available_partitions_for_topic(self, topic):

    if (topic not in self._partitions):
        return None
    return set([partition for (partition, metadata) in six.iteritems(self._partitions[topic]) if (metadata.leader != (-1))])
