code: def visit_impl(self, g, node):
      if not isinstance(node, ParsedTFNode):
          node = g[node]
  
      if node.name in self.terminal:
          self.memo[node.name] = True
          return True
  
      if node.name in self.memo:
          return self.memo[node.name]
  
      # add self to memo first otherwise cycles will not terminate
      self.memo[node.name] = None
      reachable = None
      all_unreachable = True
      for i in node.outputs + node.control_outputs:
          visit_result = self.visit_impl(g, g[i])
          if (
              visit_result == True
          ):  # pylint: disable=singleton-comparison
              reachable = True
          if (
              visit_result != False
          ):  # pylint: disable=singleton-comparison
              all_unreachable = False
  
      if reachable:
          self.memo[node.name] = reachable
      elif all_unreachable:
          self.memo[node.name] = False
      else:
          self.memo[node.name] = None
  
      return reachable
  
imports: from ..parsed_tf_node import ParsedTFNode
label_desc: Use image node_id 2 for calling the FindSubgraph obj's underlying member method code with example usage: obj.visit_impl(g, node) and returns: reachable, True, self