code: def update_wrapper(
      wrapper,
      wrapped,
      assigned=functools.WRAPPER_ASSIGNMENTS,
      updated=functools.WRAPPER_UPDATES,
  ):
      """
      Patch two bugs in functools.update_wrapper.
      """
      # workaround for http://bugs.python.org/issue3445
      assigned = tuple(
          attr for attr in assigned if hasattr(wrapped, attr)
      )
      wrapper = functools.update_wrapper(
          wrapper, wrapped, assigned, updated
      )
      # workaround for https://bugs.python.org/issue17482
      wrapper.__wrapped__ = wrapped
      return wrapper
  
file_path: catboost/contrib/deprecated/python/backports.functools-lru-cache/backports/functools_lru_cache.py
imports: from __future__ import absolute_import
  import functools
  from collections import namedtuple
  from threading import RLock
label_desc: Use image node_id 1 for calling a global function with example usage: update_wrapper(wrapper, wrapped, assigned, updated) and returns: wrapper