def METHOD_NAME():
    """
    First calls parse_args to parse the arguments, and then calls either
    _generate_and_write_rsa_keypair or _generate_and_write_ed25519_keypair
    depending upon the arguments. It then dumps the corresponding key files as:
    <filename> and <filename>.pub (Private key and Public key respectively)
    """
    parser = create_parser()
    args = parser.parse_args()
    if args.type != KEY_TYPE_RSA:
        if args.bits is not None:
            parser.print_help()
            parser.error(
                "wrong arguments: bits specified,"
                " only Type RSA supports Bits as a parameter"
            )
    try:
        if args.type == KEY_TYPE_RSA:
            interface._generate_and_write_rsa_keypair(  # pylint: disable=protected-access
                filepath=args.name, bits=args.bits, prompt=args.prompt
            )
        elif args.type == KEY_TYPE_ED25519:
            interface._generate_and_write_ed25519_keypair(  # pylint: disable=protected-access
                filepath=args.name, prompt=args.prompt
            )
        elif args.type == KEY_TYPE_ECDSA:
            interface._generate_and_write_ecdsa_keypair(  # pylint: disable=protected-access
                filepath=args.name, prompt=args.prompt
            )
        else:  # pragma: no cover
            LOG.error("(in-toto-keygen) Unsupported keytype: %s", args.type)
            sys.exit(1)
        sys.exit(0)
    except Exception as e:  # pylint: disable=broad-exception-caught
        LOG.error("(in-toto-keygen) %s: %s", type(e).__name__, e)
        sys.exit(1)