code: def _build_test_instance(tested_method, value):
      class Object(object):
          def __init__(self, value):
              self.value = value
  
      setattr(Object, tested_method, lambda self: self.value)
      return Object(value)
  
file_path: sumy/tests/test_utils/test_compat.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import pytest
  from sumy import _compat
label_desc: Use image node_id 1 for calling a global function with example usage: _build_test_instance(tested_method, value) and returns: Object