def METHOD_NAME(type):
    df = vaex.from_arrays(type=pa.array(['admin', 'maintainer', 'user', 'user', 'user', None], type=type))
    df['role'] = df['type'].map({'admin':0, 'maintainer':1, 'user':2, None: -1})
    assert df['role'].tolist() == [0, 1, 2, 2, 2, -1]