code: def _get_user_defined_method(cls, method_name, *nested):
      try:
          if cls is type:
              return
          meth = getattr(cls, method_name)
          for name in nested:
              meth = getattr(meth, name, meth)
      except AttributeError:
          return
      else:
          if not isinstance(meth, _NonUserDefinedCallables):
              # Once '__signature__' will be added to 'C'-level
              # callables, this check won't be necessary
              return meth
  
imports: from __future__ import absolute_import, division, print_function
  import itertools
  import functools
  import re
  import types
  import inspect
  from collections import OrderedDict
label_desc: Use image node_id 2 for calling a global function with example usage: _get_user_defined_method(cls, method_name) and returns: meth