class_docstr: Helper to get `visit_{node_type}` methods given a node's class and cache the results.
class_docstr_tok: ["Helper","to","get","`","visit_","{","node_type","}","`","methods","given","a","node","'s","class","and","cache","the","results","."]
docstr: Using the lowercase name of the class as node_type, returns `obj.visit_{node_type}`,
  or `obj.visit_default` if the type-specific method is not found.
docstr_tok: ["Using","the","lowercase","name","of","the","class","as","node_type",",","returns","`","obj.visit_","{","node_type","}","`",",","or","`","obj.visit_default","`","if","the","type-specific","method","is","not","found","."]
code: def get(self, obj, cls):
      # type: (Any, Union[ABCMeta, type]) -> Callable
      """
      Using the lowercase name of the class as node_type, returns `obj.visit_{node_type}`,
      or `obj.visit_default` if the type-specific method is not found.
      """
      method = self._cache.get(cls)
      if not method:
          name = "visit_" + cls.__name__.lower()
          method = getattr(obj, name, obj.visit_default)
          self._cache[cls] = method
      return method
  
imports: import ast
  import collections
  import io
  import sys
  import token
  import tokenize
  from abc import ABCMeta
  from ast import Module, expr, AST
  from typing import Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union, cast, Any, TYPE_CHECKING
  from six import iteritems
label_desc: Use image node_id 2 for calling the NodeMethods obj's underlying member method code with example usage: obj.get(obj, cls) and returns: method