def first_arg_to_level_name(arg):
    """Decide what level the argument specifies and return it.  The argument
    must contain (case-insensitive) one of the values in LEVELS or be an integer
    constant.  Otherwise None will be returned."""
    try:
        return int(arg)
    except __HOLE__:
        arg = arg.upper()
        for level in LEVELS:
            if level in arg:
                return level
        return None
dataset/ETHPy150Open neovim/python-client/scripts/logging_statement_modifier.py/first_arg_to_level_name