def get_kind(arg_name: str) -> int:
    kinds = {arg.kind for (arg, _) in all_args[arg_name]}
    if (nodes.ARG_STAR in kinds):
        return nodes.ARG_STAR
    if (nodes.ARG_STAR2 in kinds):
        return nodes.ARG_STAR2
    is_opt = ((len(all_args[arg_name]) < len(stub.items)) or (nodes.ARG_OPT in kinds) or (nodes.ARG_NAMED_OPT in kinds))
    is_pos = ((nodes.ARG_OPT in kinds) or (nodes.ARG_POS in kinds))
    if is_opt:
        return (nodes.ARG_OPT if is_pos else nodes.ARG_NAMED_OPT)
    return (nodes.ARG_POS if is_pos else nodes.ARG_NAMED)
def get_kind(arg_name: str) -> int:
    kinds = {arg.kind for (arg, _) in all_args[arg_name]}
    if (nodes.ARG_STAR in kinds):
        return nodes.ARG_STAR
    if (nodes.ARG_STAR2 in kinds):
        return nodes.ARG_STAR2
    is_opt = ((len(all_args[arg_name]) < len(stub.items)) or (nodes.ARG_OPT in kinds) or (nodes.ARG_NAMED_OPT in kinds))
    is_pos = ((nodes.ARG_OPT in kinds) or (nodes.ARG_POS in kinds))
    if is_opt:
        return (nodes.ARG_OPT if is_pos else nodes.ARG_NAMED_OPT)
    return (nodes.ARG_POS if is_pos else nodes.ARG_NAMED)