code: def format_usage(
      program_name, description, commands=None, options=()
  ):
      """
      Construct the usage text.
  
      Parameters
      ----------
          program_name : str
              Usually the name of the python file that contains the experiment.
          description : str
              description of this experiment (usually the docstring).
          commands : dict[str, func]
              Dictionary of supported commands.
              Each entry should be a tuple of (name, function).
          options : list[sacred.commandline_options.CommandLineOption]
              A list of all supported commandline options.
  
      Returns
      -------
          str
              The complete formatted usage text for this experiment.
              It adheres to the structure required by ``docopt``.
  
      """
      usage = USAGE_TEMPLATE.format(
          program_name=quote(program_name),
          description=description.strip() if description else "",
          options=_format_options_usage(options),
          arguments=_format_arguments_usage(options),
          commands=_format_command_usage(commands),
      )
      return usage
  
file_path: sacred/sacred/arg_parser.py
imports: import ast
  import textwrap
  import inspect
  from shlex import quote
  from sacred.serializer import restore
  from sacred.settings import SETTINGS
  from sacred.utils import set_by_dotted_path
  from sacred.commandline_options import CLIOption
label_desc: Use image node_id 5 for calling a global function with example usage: format_usage(program_name, description, commands, options) and returns: usage