class_docstr: A Worker manager for synthetic functions. Mostly to be used in simulations. 
docstr: Set up the sampler for the time random variable. 
docstr_tok: ["Set","up","the","sampler","for","the","time","random","variable","."]
code: def _set_up_time_sampler(self):
      """Set up the sampler for the time random variable."""
      self.time_distro_params = (
          Namespace()
          if self.time_distro_params is None
          else self.time_distro_params
      )
      if self.time_distro == "caller_eval_cost":
          pass
      elif self.time_distro == "const":
          if not hasattr(self.time_distro_params, "const_val"):
              self.time_distro_params.const_val = 1
          self.time_sampler = lambda num_samples: (
              np.ones((num_samples,))
              * self.time_distro_params.const_val
          )
      elif self.time_distro == "uniform":
          if not hasattr(self.time_distro_params, "ub"):
              self.time_distro_params.ub = 2.0
              self.time_distro_params.lb = 0.0
          ub = self.time_distro_params.ub
          lb = self.time_distro_params.lb
          self.time_sampler = lambda num_samples: (
              np.random.random((num_samples,)) * (ub - lb) + lb
          )
      elif self.time_distro == "halfnormal":
          if not hasattr(self.time_distro_params, "ub"):
              self.time_distro_params.sigma = np.sqrt(np.pi / 2)
          self.time_sampler = lambda num_samples: np.abs(
              np.random.normal(
                  scale=self.time_distro_params.sigma,
                  size=(num_samples,),
              )
          )
      else:
          raise NotImplementedError(
              "Not implemented time_distro = %s yet."
              % (self.time_distro)
          )
  
imports: from __future__ import print_function
  from __future__ import division
  from argparse import Namespace
  from multiprocessing import Process
  import numpy
  import os
  import pickle
  import shutil
  import time
  from .exd_utils import EVAL_ERROR_CODE
label_desc: Use image node_id 2 for calling the SyntheticWorkerManager obj's underlying member method code with example usage: obj._set_up_time_sampler() without return types