code: def __init__(
      self,
      task_dict: dict,
      rng: Union[int, np.random.RandomState],
      task_to_unweighted_probs: dict,
  ):
      super().__init__(task_dict=task_dict, rng=rng)
      assert task_dict.keys() == task_to_unweighted_probs.keys()
      self.task_to_unweighted_probs = task_to_unweighted_probs
      self.task_names = list(task_to_unweighted_probs.keys())
      self.unweighted_probs_arr = np.array(
          [task_to_unweighted_probs[k] for k in self.task_names]
      )
      self.task_p = (
          self.unweighted_probs_arr / self.unweighted_probs_arr.sum()
      )
  
imports: import abc
  import numexpr
  import numpy
  from typing import Union, Optional, Dict
label_desc: Use image node_id 1 to create a new SpecifiedProbMultiTaskSampler object from inherited base classes: BaseMultiTaskSampler with example: obj = SpecifiedProbMultiTaskSampler(task_dict, rng, task_to_unweighted_probs)