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","."]
code: def register(self, trial: Trial) -> None:
      if self.current_task_id != TARGET_TASK_ID:
          # Don't register it. We're in warm-start mode, and this trial comes from a different
          # task. We observe the trials from other tasks using `self.observe`, rather than
          # self.algorithm.observe, since we want to reuse the collision-handling logic of the
          # TransformWrapper.
  
          # TODO: There's maybe a slight problem with this: The TransformWrapper base-class will
          # registers trials in the registry mapping, and the registry mapping usually assumes
          # that the source and target registries contain the source and target trials. However,
          # here, we don't actually register the source trial in our source registry.
          # This isn't currently causing any issues, and I'm currently unable to imagine a
          # scenario in which it would cause problems, although it might be possible.
          # Leaving this as a TODO for now.
          return
      super().register(trial)
  
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 8 for calling the MultiTaskWrapper obj's underlying member method code with example usage: obj.register(trial) without return types