def contains_sublist(lst, sublst):
    n = len(sublst)
    return any((sublst == lst[i:i + n]) for i in range(len(lst) - n + 1))
Should recognize the roles.
dataset/ETHPy150Open paylogic/pip-accel/pip_accel/utils.py/contains_sublist--crossover with--dataset/ETHPy150Open tophatmonocle/ims_lti_py/tests/tool_provider_tests.py/TestToolProvider.test_roles