def logging_lvl_to_kaldi_lvl(lvl: int) -> int:
    """Convert logging level to kaldi level"""
    if lvl >= 10:
        lvl = max(-3, (lvl - 20) // -10)
    else:
        lvl = 11 - lvl
    return lvl