def METHOD_NAME(self, model_name_and_config):
    model_name, config = model_name_and_config
    task_heads = dict(qa_head=ExtractiveQAHead, qa_head_2=ExtractiveQAHead)
    model = ModelForDownstreamTasks.from_config(config,
                                                model_name,
                                                task_heads=task_heads)
    for _ in range(5):
        for head_name in task_heads:
            model.set_task_head(head_name)
            assert model.task_head is model.task_heads[head_name]