Return arguments object formed by parsing the command line used to launch
    the program.

def parse_args(spectypes):
    """
    Return arguments object formed by parsing the command line used to launch
    the program.
    """
    arg_parser = argparse.ArgumentParser()
    arg_parser.add_argument(
        "-c", "--constants",
        help="emit constants instead of spec dict",
        action="store_true"
    )
    arg_parser.add_argument(
        "spectype",
        help="specifies the spec type to be generated",
        choices=spectypes
    )
    return arg_parser.parse_args()