def get_logging_level(logging_stmt, commented_out=False):
    regexp = RE_LOGGING_START_IN_COMMENT if commented_out else RE_LOGGING_START
    ret = regexp.match(logging_stmt)
    _, method_name, _, first_arg = ret.groups()
    if method_name not in LOGGING_METHODS_OF_INTEREST:
        logging.debug('skipping uninteresting logging call: %s' % method_name)
        return False

    if method_name != 'log':
        return method_name

    # if the method name did not specify the level, we must have a first_arg to extract the level from
    if not first_arg:
        logging.warning("logging.log statement found but we couldn't extract the first argument")
        return None

    # extract the level of logging from the first argument to the log() call
    level = first_arg_to_level_name(first_arg)
    if level is None:
        logging.warning("arg does not contain any known level '%s'\n" % first_arg)
        return None
    return level
Called when OnDrop returns True.
dataset/ETHPy150Open neovim/python-client/scripts/logging_statement_modifier.py/get_logging_level--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/wx/drag_and_drop.py/PythonDropTarget.OnData