'Returns list of preferred (protocols, metadata)'

def group_protocols(self):

    topics = self._subscription.subscription
    assert (topics is not None), 'Consumer    has    not    subscribed    to    topics'
    metadata_list = []
    for assignor in self.config['assignors']:
        metadata = assignor.metadata(topics)
        group_protocol = (assignor.name, metadata)
        metadata_list.append(group_protocol)
    return metadata_list
