code: def __init__(
      self,
      task_dict: dict,
      rng: Union[int, np.random.RandomState, None],
  ):
      self.task_dict = task_dict
      if isinstance(rng, int) or rng is None:
          rng = np.random.RandomState(rng)
      self.rng = rng
  
imports: import abc
  import numexpr
  import numpy
  from typing import Union, Optional, Dict
label_desc: Use image node_id 1 to create a new BaseMultiTaskSampler object  with example: obj = BaseMultiTaskSampler(task_dict, rng)