code: def apply(f, *args, **kwargs):
      """Apply a function to arguments.
  
      Parameters
      ----------
      f : callable
          The function to call.
      *args, **kwargs
      **kwargs
          Arguments to feed to the callable.
  
      Returns
      -------
      a : any
          The result of ``f(*args, **kwargs)``
  
      Examples
      --------
      >>> from toolz.curried.operator import add, sub
      >>> fs = add(1), sub(1)
      >>> tuple(map(apply, fs, (1, 2)))
      (2, -1)
  
      Class decorator
      >>> instance = apply
      >>> @instance
      ... class obj:
      ...     def f(self):
      ...         return 'f'
      ...
      >>> obj.f()
      'f'
      >>> issubclass(obj, object)
      Traceback (most recent call last):
          ...
      TypeError: issubclass() arg 1 must be a class
      >>> isinstance(obj, type)
      False
  
      See Also
      --------
      unpack_apply
      mapply
      """
      return f(*args, **kwargs)
  
file_path: catalyst/catalyst/utils/functional.py
imports: from functools import reduce
  from pprint import pformat
  from six import viewkeys
  from six.moves import map, zip
  from toolz import curry, flip
  from .sentinel import sentinel
label_desc: Use image node_id 1 for calling a global function with example usage: apply(f) and returns: f