def METHOD_NAME(app):
    subcommand_list = []
    for cmd_name, cmd, module in find_client_subcommands():
        man_entry_name = 'bkr-%s' % cmd_name
        subcommand_list_entry = [man_entry_name]
        docstring = module.__doc__
        title = _get_title_from_docstring(docstring)
        # Get the descriptive text from the title
        match = re.search('bkr %s: (.+)$' % cmd_name, title)
        if match:
            try:
                title_description = match.group(1)
                subcommand_list_entry.append(title_description)
            except IndexError:
                pass
        # Ideally we should have the man entry name, and the description
        if len(subcommand_list_entry) < 2:
            warnings.filterwarnings('always',
                'Cannot find command description for %s, not adding it to bkr.rst' % cmd_name)
        subcommand_list.append(subcommand_list_entry)
    # Write bkr.rst subcommands
    subcommands_path = os.path.join(app.srcdir, 'man', 'subcommands.rst')
    with open(subcommands_path, 'w') as command_file:
        command_file.write(':orphan:\n\n')
        command_file.write('.. This file is autogenerated with commands found'
            ' in bkr.client.commands\n\n')
        command_file.write('Subcommands\n***********\n\n')
        # Sort by command name
        subcommand_list = sorted(subcommand_list,
            key=lambda subcommand_list_entry: subcommand_list_entry[0])
        for subcommand_list_entry in subcommand_list:
            man_text = subcommand_list_entry[0]
            desc = ''
            if len(subcommand_list_entry) == 2:
                desc = subcommand_list_entry[1]
            command_file.write('* :manpage:`%s(1)` -- %s\n' % (man_text, desc))