def _add_complex(self, members, is_association=False):
        """Assemble a Complex statement."""
        params = {'color': '#0000ff',
                  'arrowhead': 'dot',
                  'arrowtail': 'dot',
                  'dir': 'both'}
        for m1, m2 in itertools.combinations(members, 2):
            if self._has_complex_node(m1, m2):
                continue
            if is_association:
                m1_key = _get_node_key(m1.concept)
                m2_key = _get_node_key(m2.concept)
            else:
                m1_key = _get_node_key(m1)
                m2_key = _get_node_key(m2)
            edge_key = (set([m1_key, m2_key]), 'complex')
            if edge_key in self.existing_edges:
                return
            self.existing_edges.append(edge_key)
            self._add_edge(m1_key, m2_key, **params)
def _add_complex ( self , members , is_association = False ) : params = { 'color' : '#0000ff' , 'arrowhead' : 'dot' , 'arrowtail' : 'dot' , 'dir' : 'both' } for m1 , m2 in itertools . combinations ( members , 2 ) : if self . _has_complex_node ( m1 , m2 ) : continue if is_association : m1_key = _get_node_key ( m1 . concept ) m2_key = _get_node_key ( m2 . concept ) else : m1_key = _get_node_key ( m1 ) m2_key = _get_node_key ( m2 ) edge_key = ( set ( [ m1_key , m2_key ] ) , 'complex' ) if edge_key in self . existing_edges : return self . existing_edges . append ( edge_key ) self . _add_edge ( m1_key , m2_key , ** params )
Assemble a Complex statement.