class_docstr: Implements the ISMAGS subgraph matching algorithm. [1]_ ISMAGS stands for
  "Index-based Subgraph Matching Algorithm with General Symmetries". As the
  name implies, it is symmetry aware and will only generate non-symmetric
  isomorphisms.
  
  Notes
  -----
  The implementation imposes additional conditions compared to the VF2
  algorithm on the graphs provided and the comparison functions
  (:attr:`node_equality` and :attr:`edge_equality`):
  
   - Node keys in both graphs must be orderable as well as hashable.
   - Equality must be transitive: if A is equal to B, and B is equal to C,
     then A must be equal to C.
  
  Attributes
  ----------
  graph: networkx.Graph
  subgraph: networkx.Graph
  node_equality: collections.abc.Callable
      The function called to see if two nodes should be considered equal.
      It's signature looks like this:
      ``f(graph1: networkx.Graph, node1, graph2: networkx.Graph, node2) -> bool``.
      `node1` is a node in `graph1`, and `node2` a node in `graph2`.
      Constructed from the argument `node_match`.
  edge_equality: collections.abc.Callable
      The function called to see if two edges should be considered equal.
      It's signature looks like this:
      ``f(graph1: networkx.Graph, edge1, graph2: networkx.Graph, edge2) -> bool``.
      `edge1` is an edge in `graph1`, and `edge2` an edge in `graph2`.
      Constructed from the argument `edge_match`.
  
  References
  ----------
  .. [1] M. Houbraken, S. Demeyer, T. Michoel, P. Audenaert, D. Colle,
     M. Pickavet, "The Index-Based Subgraph Matching Algorithm with General
     Symmetries (ISMAGS): Exploiting Symmetry for Faster Subgraph
     Enumeration", PLoS One 9(5): e97896, 2014.
     https://doi.org/10.1371/journal.pone.0097896
class_docstr_tok: ["Implements","the","ISMAGS","subgraph","matching","algorithm",".","[","1","]","_","ISMAGS","stands","for","''","Index-based","Subgraph","Matching","Algorithm","with","General","Symmetries","''",".","As","the","name","implies",",","it","is","symmetry","aware","and","will","only","generate","non-symmetric","isomorphisms",".","Notes","--","--","-","The","implementation","imposes","additional","conditions","compared","to","the","VF2","algorithm","on","the","graphs","provided","and","the","comparison","functions","(",":","attr",":","`","node_equality","`","and",":","attr",":","`","edge_equality","`",")",":","-","Node","keys","in","both","graphs","must","be","orderable","as","well","as","hashable",".","-","Equality","must","be","transitive",":","if","A","is","equal","to","B",",","and","B","is","equal","to","C",",","then","A","must","be","equal","to","C.","Attributes","--","--","--","--","--","graph",":","networkx.Graph","subgraph",":","networkx.Graph","node_equality",":","collections.abc.Callable","The","function","called","to","see","if","two","nodes","should","be","considered","equal",".","It","'s","signature","looks","like","this",":","``","f","(","graph1",":","networkx.Graph",",","node1",",","graph2",":","networkx.Graph",",","node2",")","-",">","bool","``",".","`","node1","`","is","a","node","in","`","graph1","`",",","and","`","node2","`","a","node","in","`","graph2","`",".","Constructed","from","the","argument","`","node_match","`",".","edge_equality",":","collections.abc.Callable","The","function","called","to","see","if","two","edges","should","be","considered","equal",".","It","'s","signature","looks","like","this",":","``","f","(","graph1",":","networkx.Graph",",","edge1",",","graph2",":","networkx.Graph",",","edge2",")","-",">","bool","``",".","`","edge1","`","is","an","edge","in","`","graph1","`",",","and","`","edge2","`","an","edge","in","`","graph2","`",".","Constructed","from","the","argument","`","edge_match","`",".","References","--","--","--","--","--","..","[","1","]","M.","Houbraken",",","S.","Demeyer",",","T.","Michoel",",","P.","Audenaert",",","D.","Colle",",","M.","Pickavet",",","``","The","Index-Based","Subgraph","Matching","Algorithm","with","General","Symmetries","(","ISMAGS",")",":","Exploiting","Symmetry","for","Faster","Subgraph","Enumeration","''",",","PLoS","One","9","(","5",")",":","e97896",",","2014.","https",":","\/\/doi.org\/10.1371\/journal.pone.0097896"]
docstr: Returns a new set where node has been removed from nodes, subject to
  symmetry constraints. We know, that for every constraint we have
  those subgraph nodes are equal. So whenever we would remove the
  lower part of a constraint, remove the higher instead.
code: def _remove_node(node, nodes, constraints):
      """
      Returns a new set where node has been removed from nodes, subject to
      symmetry constraints. We know, that for every constraint we have
      those subgraph nodes are equal. So whenever we would remove the
      lower part of a constraint, remove the higher instead.
      """
      while True:
          for low, high in constraints:
              if low == node and high in nodes:
                  node = high
                  break
          else:  # no break, couldn't find node in constraints
              break
      return frozenset(nodes - {node})
  
imports: import itertools
  from collections import Counter, defaultdict
  from functools import reduce, wraps
label_desc: Use image node_id 31 for calling the ISMAGS obj's underlying member method code with example usage: obj._remove_node(node, nodes, constraints) and returns: frozenset