code: def proxy_method(cls, name):
      # This unbound method will be pulled from the superclass.
      invalidInputError(
          hasattr(cls, name),
          f"%s should have %s attribute" % (str(cls.__name__), name),
      )
      proxyed = getattr(cls, name)
  
      @functools.wraps(proxyed)
      def wrapper(self, *args, **kwargs):
          return self._proxy(
              name, proxyed.__get__(self, cls), *args, **kwargs
          )
  
      return wrapper
  
imports: import functools
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 1 for calling a global function with example usage: proxy_method(cls, name) and returns: wrapper, self