def METHOD_NAME(handler):
    assert len(handler.handle.thread_groups["preprocess"]) == 1
    assert len(handler.handle.thread_groups["inference"]) == 2
    assert len(handler.handle.thread_groups["postprocess"]) == 3
    new_parallelism = {
        "preprocess": 2,
        "inference": 3,
        "postprocess": 4,
    }
    handler.handle.parallelism = new_parallelism
    assert len(handler.handle.thread_groups["preprocess"]) == 2
    assert len(handler.handle.thread_groups["inference"]) == 3
    assert len(handler.handle.thread_groups["postprocess"]) == 4
    new_parallelism = {
        "preprocess": 1,
        "inference": 2,
        "postprocess": 3,
    }
    handler.handle.parallelism = new_parallelism
    assert len(handler.handle.thread_groups["preprocess"]) == 1
    assert len(handler.handle.thread_groups["inference"]) == 2
    assert len(handler.handle.thread_groups["postprocess"]) == 3