def add_arguments(parser, create_group=True):
    """A helper function to add standard command-line options to make an API
    instance.

    This adds the following command-line options:
        --btn_cache_path: The path to the BTN cache.

    Args:
        parser: An argparse.ArgumentParser.
        create_group: Whether or not to create a subgroup for BTN API options.
            Defaults to True.

    Returns:
        Either the argparse.ArgumentParser or the subgroup that was implicitly
            created.
    """
    if create_group:
        target = parser.add_argument_group("BTN API options")
    else:
        target = parser

    target.add_argument("--btn_cache_path", type=str)

    return target