code: def test_init_to_value():
      def model():
          pyro.sample("x", dist.LogNormal(0, 1))
  
      value = torch.randn(()).exp() * 10
      kernel = NUTS(
          model,
          init_strategy=partial(init_to_value, values={"x": value}),
      )
      kernel.setup(warmup_steps=10)
      assert_close(value, kernel.initial_params["x"].exp())
  
file_path: pyro/tests/infer/mcmc/test_mcmc_util.py
imports: from functools import partial
  import pytest
  import torch
  import pyro
  import pyro.distributions
  from pyro.infer import Predictive
  from pyro.infer.autoguide import init_to_feasible, init_to_generated, init_to_mean, init_to_median, init_to_sample, init_to_uniform, init_to_value
  from pyro.infer.mcmc import NUTS
  from pyro.infer.mcmc.api import MCMC
  from pyro.infer.mcmc.util import initialize_model
  from pyro.util import optional
  from tests.common import assert_close, str_erase_pointers
label_desc: Use image node_id 6 for calling a global function with example usage: test_init_to_value() without return types