code: def check_wrapper_attrs(self, method_wrapper, format_str):
      def func(x):
          return x
  
      wrapper = method_wrapper(func)
  
      self.assertIs(wrapper.__func__, func)
      self.assertIs(wrapper.__wrapped__, func)
  
      for attr in (
          "__module__",
          "__qualname__",
          "__name__",
          "__doc__",
          "__annotations__",
      ):
          self.assertIs(getattr(wrapper, attr), getattr(func, attr))
  
      self.assertEqual(repr(wrapper), format_str.format(func))
      return wrapper
  
imports: import unittest
  from types import MethodType
label_desc: Use image node_id 2 for calling the TestDecorators obj's underlying member method code with example usage: obj.check_wrapper_attrs(method_wrapper, format_str) and returns: wrapper, x