code: def set_attribute(name, value):
      """
      Decorator factory for setting attributes on a function.
  
      Doesn't change the behavior of the wrapped function.
  
      Examples
      --------
      >>> @set_attribute('__name__', 'foo')
      ... def bar():
      ...     return 3
      ...
      >>> bar()
      3
      >>> bar.__name__
      'foo'
      """
  
      def decorator(f):
          setattr(f, name, value)
          return f
  
      return decorator
  
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 9 for calling a global function with example usage: set_attribute(name, value) and returns: decorator, f