code: def make_decorator(
      target,
      decorator_func,
      decorator_name=None,
      decorator_doc="",
      decorator_argspec=None,
  ):
      """Make a decorator from a wrapper and a target.
  
      Args:
        target: The final callable to be wrapped.
        decorator_func: The wrapper function.
        decorator_name: The name of the decorator. If `None`, the name of the
          function calling make_decorator.
        decorator_doc: Documentation specific to this application of
          `decorator_func` to `target`.
        decorator_argspec: The new callable signature of this decorator.
  
      Returns:
        The `decorator_func` argument with new metadata attached.
        Note that we just wrap the function and adjust the members but do not insert the special
        member TFDecorator
      """
      if decorator_name is None:
          decorator_name = inspect.currentframe().f_back.f_code.co_name
      # Objects that are callables (e.g., a functools.partial object) may not have
      # the following attributes.
      if hasattr(target, "__name__"):
          decorator_func.__name__ = target.__name__
      if hasattr(target, "__qualname__"):
          decorator_func.__qualname__ = target.__qualname__
      if hasattr(target, "__module__"):
          decorator_func.__module__ = target.__module__
      if hasattr(target, "__dict__"):
          # Copy dict entries from target which are not overridden by decorator_func.
          for name in target.__dict__:
              if name not in decorator_func.__dict__:
                  decorator_func.__dict__[name] = target.__dict__[name]
      decorator_func.__wrapped__ = target
      # Keeping a second handle to `target` allows callers to detect whether the
      # decorator was modified using `rewrap`.
      decorator_func.__original_wrapped__ = target
      return decorator_func
  
imports: import inspect
label_desc: Use image node_id 3 for calling a global function with example usage: make_decorator(target, decorator_func, decorator_name, decorator_doc, decorator_argspec) and returns: decorator_func