class_docstr: Wrapper that makes the algo "multi-task" by adding a task id to the inputs.
class_docstr_tok: ["Wrapper","that","makes","the","algo","``","multi-task","''","by","adding","a","task","id","to","the","inputs","."]
docstr: Contextmanager that temporarily changes the value of `self.current_task_id`
  to `task_id` and restores the original value after exiting the with block.
docstr_tok: ["Contextmanager","that","temporarily","changes","the","value","of","`","self.current_task_id","`","to","`","task_id","`","and","restores","the","original","value","after","exiting","the","with","block","."]
code: def in_task(self, task_id: int):
      """Contextmanager that temporarily changes the value of `self.current_task_id`
      to `task_id` and restores the original value after exiting the with block.
      """
      previous_task_id = self.current_task_id
      self.current_task_id = task_id
      yield
      self.current_task_id = previous_task_id
  
imports: from __future__ import annotations
  import copy
  from collections import defaultdict
  from contextlib import contextmanager
  from logging import getLogger
  from orion.algo.space import Categorical, Space
  from orion.core.utils.format_trials import dict_to_trial
  from orion.core.worker.algo_wrappers.algo_wrapper import AlgoT
  from orion.core.worker.algo_wrappers.transform_wrapper import TransformWrapper, _copy_status_and_results
  from orion.core.worker.experiment_config import ExperimentConfig
  from orion.core.worker.trial import Trial
  from orion.core.worker.warm_start.knowledge_base import KnowledgeBase
  from orion.core.worker.warm_start.warm_starteable import WarmStarteable
label_desc: Use image node_id 15 for calling the MultiTaskWrapper obj's underlying member method code with example usage: obj.in_task(task_id) without return types