code: def decorator(
      fun: Wrapper[P, T]
  ) -> Callable[[Callable[P, T]], Callable[P, T]]:
      return cast(
          Callable[[Callable[P, T]], Callable[P, T]], _decorator(fun)
      )
  
imports: from typing import TypeVar, Callable, cast, Protocol
  from typing_extensions import ParamSpec
  from decorator import decorator
label_desc: Use image node_id 1 for calling a global function with example usage: decorator(fun) and returns: cast