def lookup_level(level):
    """Return the integer representation of a logging level."""
    if isinstance(level, integer_types):
        return level
    try:
        return _reverse_level_names[level]
    except __HOLE__:
        raise LookupError('unknown level name %s' % level)
dataset/ETHPy150Open getlogbook/logbook/logbook/base.py/lookup_level