def METHOD_NAME(level: LevelIsh) -> Level:
    # todo put in some global file, like envvars.py
    glevel = os.environ.get('PROMNESIA_LOGS', None)
    if glevel is not None:
        level = glevel
    if level is None:
        return logging.NOTSET
    if isinstance(level, int):
        return level
    return getattr(logging, level.upper())