class_docstr: Builds Approximation instance from a given trace,
  it has the same interface as variational approximation
class_docstr_tok: ["Builds","Approximation","instance","from","a","given","trace",",","it","has","the","same","interface","as","variational","approximation"]
code: def _new_initial(self, size, deterministic, more_replacements=None):
      pytensor_condition_is_here = isinstance(deterministic, Variable)
      if size is None:
          size = 1
      size = pt.as_tensor(size)
      if pytensor_condition_is_here:
          return pt.switch(
              deterministic,
              pt.repeat(self.mean.reshape((1, -1)), size, -1),
              self.histogram[self.randidx(size)],
          )
      else:
          if deterministic:
              raise NotImplementedInference(
                  "Deterministic sampling from a Histogram is broken in v4"
              )
              return pt.repeat(self.mean.reshape((1, -1)), size, -1)
          else:
              return self.histogram[self.randidx(size)]
  
imports: from typing import Optional
  import numpy
  import pytensor
  from arviz import InferenceData
  from pytensor import tensor
  from pytensor.graph.basic import Variable
  from pytensor.graph.replace import graph_replace
  from pytensor.tensor.variable import TensorVariable
  import pymc
  from pymc.blocking import DictToArrayBijection
  from pymc.distributions.dist_math import rho2sigma
  from pymc.util import makeiter
  from pymc.variational import opvi
  from pymc.variational.opvi import Approximation, Group, NotImplementedInference, _known_scan_ignored_inputs, node_property
label_desc: Use image node_id 5 for calling the EmpiricalGroup obj's underlying member method code with example usage: obj._new_initial(size, deterministic, more_replacements) and returns: pt, pt, self