def METHOD_NAME(self, active: bool) -> Set[TP]:
    assignment = self.actives if active else self.standbys
    return {
        TP(topic=topic, partition=partition)
        for topic, partitions in assignment.items()
        for partition in partitions
    }