docstr: Returns True if adding (G1_node, G2_node) is semantically
  feasible.
  
  Any subclass which redefines semantic_feasibility() must
  maintain the self.tests if needed, to keep the match() method
  functional. Implementations should consider multigraphs.
docstr_tok: ["Returns","True","if","adding","(","G1_node",",","G2_node",")","is","semantically","feasible",".","Any","subclass","which","redefines","semantic_feasibility","(",")","must","maintain","the","self.tests","if","needed",",","to","keep","the","match","(",")","method","functional",".","Implementations","should","consider","multigraphs","."]
code: def semantic_feasibility(self, G1_node, G2_node):
      """Returns True if adding (G1_node, G2_node) is semantically
      feasible.
  
      Any subclass which redefines semantic_feasibility() must
      maintain the self.tests if needed, to keep the match() method
      functional. Implementations should consider multigraphs.
      """
      pred, succ = (
          [
              n
              for n in self.G1.predecessors(G1_node)
              if n in self.core_1
          ],
          [n for n in self.G1.successors(G1_node) if n in self.core_1],
      )
      if not self.one_hop(
          self.G1, G1_node, self.core_1, pred, succ
      ):  # Fail fast on first node.
          return False
      if not self.two_hop_pred(self.G1, G1_node, self.core_1, pred):
          return False
      if not self.two_hop_succ(self.G1, G1_node, self.core_1, succ):
          return False
      # Otherwise, this node is semantically feasible!
      return True
  
imports: import networkx
  from .isomorphvf2 import DiGraphMatcher, GraphMatcher
label_desc: Use image node_id 11 for calling the TimeRespectingDiGraphMatcher obj's underlying member method code with example usage: obj.semantic_feasibility(G1_node, G2_node) and returns: True, False, False, False