code: def get_real_method(obj, holder):
      """
      Attempts to obtain the real function object that might be wrapping ``obj``, while at the same time
      returning a bound method to ``holder`` if the original object was a bound method.
      """
      try:
          is_method = hasattr(obj, "__func__")
          obj = get_real_func(obj)
      except Exception:
          return obj
      if (
          is_method
          and hasattr(obj, "__get__")
          and callable(obj.__get__)
      ):
          obj = obj.__get__(holder)
      return obj
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import codecs
  import functools
  import inspect
  import re
  import sys
  from contextlib import contextmanager
  import attr
  import py
  import six
  from six import text_type
  import _pytest
  from _pytest._io.saferepr import saferepr
  from _pytest.outcomes import fail
  from _pytest.outcomes import TEST_OUTCOME
label_desc: Use image node_id 11 for calling a global function with example usage: get_real_method(obj, holder) and returns: obj, obj