def mk_level(ptype):
    """Convert a Pylint warning "type" to a Sarif level"""
    ldict = {'error': 'error',
             'warning': 'warning',
             'refactor': 'note',
             'convention': 'note',
             'usage': 'note'}
    return ldict.get(ptype, 'note')