def compute_group_colors(self):
        """Computes the group colors according to node colors"""
        seen = set()
        self.group_label_color = [
            x for x in self.node_colors if not (x in seen or seen.add(x))
        ]
def compute_group_colors ( self ) : seen = set ( ) self . group_label_color = [ x for x in self . node_colors if not ( x in seen or seen . add ( x ) ) ]
Computes the group colors according to node colors