code: def matches(node, pattern):
      """Basic pattern matcher for AST.
  
      The pattern may contain wildcards represented by the symbol '_'. A node
      matches a pattern if for every node in the tree, either there is a node of
      the same type in pattern, or a Name node with id='_'.
  
      Args:
        node: ast.AST
        pattern: ast.AST
      Returns:
        bool
      """
      if isinstance(pattern, str):
          pattern = parser.parse_str(pattern)
  
      matcher = PatternMatcher(pattern)
      matcher.visit(node)
      return matcher.matches
  
imports: import ast
  import gast
  from tensorflow.python.autograph.pyct import anno
  from tensorflow.python.autograph.pyct import parser
  from tensorflow.python.autograph.pyct import qual_names
label_desc: Use image node_id 4 for calling a global function with example usage: matches(node, pattern) and returns: matcher