Construct the Commands-part of the usage text.

    Parameters
    ----------
        commands : dict[str, func]
            dictionary of supported commands.
            Each entry should be a tuple of (name, function).

    Returns
    -------
        str
            Text formatted as a description of the commands.

def _format_command_usage(commands):
    """
    Construct the Commands-part of the usage text.

    Parameters
    ----------
        commands : dict[str, func]
            dictionary of supported commands.
            Each entry should be a tuple of (name, function).

    Returns
    -------
        str
            Text formatted as a description of the commands.

    """
    if not commands:
        return ""
    command_usage = "\nCommands:\n"
    cmd_len = max([len(c) for c in commands] + [8])
    command_doc = OrderedDict(
        [(cmd_name, _get_first_line_of_docstring(cmd_doc))
         for cmd_name, cmd_doc in commands.items()])
    for cmd_name, cmd_doc in command_doc.items():
        command_usage += ("  {:%d}  {}\n" % cmd_len).format(cmd_name, cmd_doc)
    return command_usage