code: def randomize(self, rand_gen=None, *args, **kwargs):
          
          if rand_gen is None:
              rand_gen = np.random.normal
          # first take care of all parameters (from N(0,1))
          x = rand_gen(size=self._size_transformed(), *args, **kwargs)
          updates = self.update_model()
          self.update_model(False) # Switch off the updates
          self.optimizer_array = x  # makes sure all of the tied parameters get the same init (since there's only one prior object...)
          # now draw from prior where possible
          x = self.param_array.copy()
          unfixlist = np.ones((self.size,),dtype=np.bool)
          unfixlist[self.constraints[__fixed__]] = False
          self.param_array.flat[unfixlist] = x.view(np.ndarray).ravel()[unfixlist]
          self.update_model(updates)
docs: Randomize the model.
          Make this draw from the rand_gen if one exists, else draw random normal(0,1)
  
          :param rand_gen: np random number generator which takes args and kwargs
          :param flaot loc: loc parameter for random number generator
          :param float scale: scale parameter for random number generator
          :param args, kwargs: will be passed through to random number generator