<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def commands(config, names):
 """Return the list of commands to run."""

    commands = {cmd: Command(**dict((minus_to_underscore(k), v)
                                    for k, v in config.items(cmd)))
                for cmd in config.sections()
                if cmd != 'packages'}
    try:
        return tuple(commands[x] for x in names)
    except KeyError as e:
        raise RuntimeError(
            'Section [commands] in the config file does not contain the '
            'key {.args[0]!r} you requested to execute.'.format(e))