def add_commands(parser, functions, namespace=None, namespace_kwargs=None,<EOL>func_kwargs=None,<EOL>title=None, description=None, help=None):
<EOL>if DEST_FUNCTION in parser._defaults:<EOL><INDENT>_require_support_for_default_command_with_subparsers()<EOL><DEDENT>namespace_kwargs = namespace_kwargs or {}<EOL>if title:<EOL><INDENT>warnings.warn('<STR_LIT>'<EOL>'<STR_LIT>', DeprecationWarning)<EOL>namespace_kwargs['<STR_LIT:description>'] = title<EOL><DEDENT>if help:<EOL><INDENT>warnings.warn('<STR_LIT>'<EOL>'<STR_LIT>', DeprecationWarning)<EOL>namespace_kwargs['<STR_LIT>'] = help<EOL><DEDENT>if description:<EOL><INDENT>warnings.warn('<STR_LIT>'<EOL>'<STR_LIT>', DeprecationWarning)<EOL>namespace_kwargs['<STR_LIT:description>'] = description<EOL><DEDENT>subparsers_action = get_subparsers(parser, create=True)<EOL>if namespace:<EOL><INDENT>subsubparser_kw = {<EOL>'<STR_LIT>': namespace_kwargs.get('<STR_LIT:title>'),<EOL>}<EOL>subsubparser = subparsers_action.add_parser(namespace, **subsubparser_kw)<EOL>subparsers_action = subsubparser.add_subparsers(**namespace_kwargs)<EOL><DEDENT>else:<EOL><INDENT>assert not namespace_kwargs, ('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>for func in functions:<EOL><INDENT>cmd_name, func_parser_kwargs = _extract_command_meta_from_func(func)<EOL>if func_kwargs:<EOL><INDENT>func_parser_kwargs.update(func_kwargs)<EOL><DEDENT>command_parser = subparsers_action.add_parser(cmd_name, **func_parser_kwargs)<EOL>set_default_command(command_parser, func)<EOL><DEDENT>
Adds given functions as commands to given parser.

:param parser:

    an :class:`argparse.ArgumentParser` instance.

:param functions:

    a list of functions. A subparser is created for each of them.
    If the function is decorated with :func:`~argh.decorators.arg`, the
    arguments are passed to :class:`argparse.ArgumentParser.add_argument`.
    See also :func:`~argh.dispatching.dispatch` for requirements
    concerning function signatures. The command name is inferred from the
    function name. Note that the underscores in the name are replaced with
    hyphens, i.e. function name "foo_bar" becomes command name "foo-bar".

:param namespace:

    an optional string representing the group of commands. For example, if
    a command named "hello" is added without the namespace, it will be
    available as "prog.py hello"; if the namespace if specified as "greet",
    then the command will be accessible as "prog.py greet hello". The
    namespace itself is not callable, so "prog.py greet" will fail and only
    display a help message.

:param func_kwargs:

    a `dict` of keyword arguments to be passed to each nested ArgumentParser
    instance created per command (i.e. per function).  Members of this
    dictionary have the highest priority, so a function's docstring is
    overridden by a `help` in `func_kwargs` (if present).

:param namespace_kwargs:

    a `dict` of keyword arguments to be passed to the nested ArgumentParser
    instance under given `namespace`.

Deprecated params that should be moved into `namespace_kwargs`:

:param title:

    passed to :meth:`argparse.ArgumentParser.add_subparsers` as `title`.

    .. deprecated:: 0.26.0

       Please use `namespace_kwargs` instead.

:param description:

    passed to :meth:`argparse.ArgumentParser.add_subparsers` as
    `description`.

    .. deprecated:: 0.26.0

       Please use `namespace_kwargs` instead.

:param help:

    passed to :meth:`argparse.ArgumentParser.add_subparsers` as `help`.

    .. deprecated:: 0.26.0

       Please use `namespace_kwargs` instead.

.. note::

    This function modifies the parser object. Generally side effects are
    bad practice but we don't seem to have any choice as ArgumentParser is
    pretty opaque.
    You may prefer :class:`~argh.helpers.ArghParser.add_commands` for a bit
    more predictable API.

.. note::

   An attempt to add commands to a parser which already has a default
   function (e.g. added with :func:`~argh.assembling.set_default_command`)
   results in `AssemblingError`.