code: def test_nested_initvals(self):
      # See issue #5168
      with pm.Model() as pmodel:
          one = pm.LogNormal(
              "one", mu=np.log(1), sigma=1e-5, initval="prior"
          )
          two = pm.Lognormal(
              "two", mu=np.log(one * 2), sigma=1e-5, initval="prior"
          )
          three = pm.LogNormal(
              "three", mu=np.log(two * 2), sigma=1e-5, initval="prior"
          )
          four = pm.LogNormal(
              "four", mu=np.log(three * 2), sigma=1e-5, initval="prior"
          )
          five = pm.LogNormal(
              "five", mu=np.log(four * 2), sigma=1e-5, initval="prior"
          )
          six = pm.LogNormal(
              "six", mu=np.log(five * 2), sigma=1e-5, initval="prior"
          )
  
      ip_vals = list(
          make_initial_point_fn(model=pmodel, return_transformed=True)(
              0
          ).values()
      )
      assert np.allclose(
          np.exp(ip_vals), [1, 2, 4, 8, 16, 32], rtol=1e-3
      )
  
      ip_vals = list(
          make_initial_point_fn(model=pmodel, return_transformed=False)(
              0
          ).values()
      )
      assert np.allclose(ip_vals, [1, 2, 4, 8, 16, 32], rtol=1e-3)
  
      pmodel.rvs_to_initial_values[four] = 1
  
      ip_vals = list(
          make_initial_point_fn(model=pmodel, return_transformed=True)(
              0
          ).values()
      )
      assert np.allclose(np.exp(ip_vals), [1, 2, 4, 1, 2, 4], rtol=1e-3)
  
      ip_vals = list(
          make_initial_point_fn(model=pmodel, return_transformed=False)(
              0
          ).values()
      )
      assert np.allclose(ip_vals, [1, 2, 4, 1, 2, 4], rtol=1e-3)
  
imports: import cloudpickle
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from pytensor.tensor.random.op import RandomVariable
  import pymc
  from pymc.distributions.distribution import moment
  from pymc.initial_point import make_initial_point_fn, make_initial_point_fns_per_chain
label_desc: Use image node_id 3 for calling the TestInitvalEvaluation obj's underlying member method code with example usage: obj.test_nested_initvals() without return types