<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def collect_add_argparse(parser, modules):
 """Add all command-line options. `modules` is an iterable of :class:`yakonfig.configurable.Configurable` objects, or anything equivalently typed. This calls :meth:`~yakonfig.configurable.Configurable.add_arguments` (if present) on all of them to set the global command-line arguments. :param argparse.ArgumentParser parser: argparse parser :param modules: modules or Configurable instances to use :type modules: iterable of :class:`~yakonfig.configurable.Configurable` """

    def work_in(parent_config, config_name, prefix, module):
        f = getattr(module, 'add_arguments', None)
        if f is not None:
            f(parser)
    _recurse_config(dict(), modules, work_in)
    return parser