code: def apply(transform):
      """
      Decorate a function with a transform function that is
      invoked on results returned from the decorated function.
  
      >>> @apply(reversed)
      ... def get_numbers(start):
      ...     "doc for get_numbers"
      ...     return range(start, start+3)
      >>> list(get_numbers(4))
      [6, 5, 4]
      >>> get_numbers.__doc__
      'doc for get_numbers'
      """
  
      def wrap(func):
          return functools.wraps(func)(compose(transform, func))
  
      return wrap
  
imports: import functools
  import time
  import inspect
  import collections
  import types
  import itertools
  import warnings
  import setuptools.extern.more_itertools
  from typing import Callable, TypeVar
label_desc: Use image node_id 6 for calling a global function with example usage: apply(transform) and returns: wrap, functools