<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def genargs() -> ArgumentParser: """ Create a command line parser :return: parser """

    parser = ArgumentParser()
    parser.add_argument("spec", help="JSG specification - can be file name, URI or string")
    parser.add_argument("-o", "--outfile", help="Output python file - if omitted, python is not saved")
    parser.add_argument("-p", "--print", help="Print python file to stdout")
    parser.add_argument("-id", "--inputdir", help="Input directory with JSON files")
    parser.add_argument("-i", "--json", help="URL, file name or json text", nargs='*')
    return parser