code: def option(*param_decls, **attrs):
      """Attaches an option to the command.  All positional arguments are
      passed as parameter declarations to :class:`Option`; all keyword
      arguments are forwarded unchanged (except ``cls``).
      This is equivalent to creating an :class:`Option` instance manually
      and attaching it to the :attr:`Command.params` list.
  
      :param cls: the option class to instantiate.  This defaults to
                  :class:`Option`.
      """
  
      def decorator(f):
          # Issue 926, copy attrs, so pre-defined options can re-use the same cls=
          option_attrs = attrs.copy()
  
          if "help" in option_attrs:
              option_attrs["help"] = inspect.cleandoc(
                  option_attrs["help"]
              )
          OptionClass = option_attrs.pop("cls", Option)
          _param_memo(f, OptionClass(param_decls, **option_attrs))
          return f
  
      return decorator
  
imports: import inspect
  import sys
  from functools import update_wrapper
  from ._compat import iteritems
  from ._unicodefun import _check_for_unicode_literals
  from .core import Argument
  from .core import Command
  from .core import Group
  from .core import Option
  from .globals import get_current_context
  from .utils import echo
label_desc: Use image node_id 9 for calling a global function with example usage: option() and returns: decorator, f