code: def _make_command(f, name, attrs, cls):
      if isinstance(f, Command):
          raise TypeError(
              "Attempted to convert a callback into a command twice."
          )
      try:
          params = f.__click_params__
          params.reverse()
          del f.__click_params__
      except AttributeError:
          params = []
      help = attrs.get("help")
      if help is None:
          help = inspect.getdoc(f)
          if isinstance(help, bytes):
              help = help.decode("utf-8")
      else:
          help = inspect.cleandoc(help)
      attrs["help"] = help
      _check_for_unicode_literals()
      return cls(
          name=name or f.__name__.lower().replace("_", "-"),
          callback=f,
          params=params,
          **attrs,
      )
  
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 4 for calling a global function with example usage: _make_command(f, name, attrs, cls) and returns: cls