code: def test_fit_start(inference_spec, simple_model):
      mu_init = 17
      mu_sigma_init = 13
  
      with simple_model:
          if type(inference_spec()) == ASVGD:
              # ASVGD doesn't support the start argument
              return
          elif type(inference_spec()) == ADVI:
              has_start_sigma = True
          else:
              has_start_sigma = False
  
      kw = {"start": {"mu": mu_init}}
      if has_start_sigma:
          kw.update({"start_sigma": {"mu": mu_sigma_init}})
      with simple_model:
          inference = inference_spec(**kw)
  
      # Minibatch data can't be extracted into the `observed_data` group in the final InferenceData
      [observed_value] = [
          simple_model.rvs_to_values[obs]
          for obs in simple_model.observed_RVs
      ]
      if observed_value.name.startswith("minibatch"):
          warn_ctxt = pytest.warns(
              UserWarning,
              match="Could not extract data from symbolic observation",
          )
      else:
          warn_ctxt = nullcontext()
  
      try:
          with warn_ctxt:
              trace = inference.fit(n=0).sample(10000)
      except NotImplementedInference as e:
          pytest.skip(str(e))
      np.testing.assert_allclose(
          np.mean(trace.posterior["mu"]), mu_init, rtol=0.05
      )
      if has_start_sigma:
          np.testing.assert_allclose(
              np.std(trace.posterior["mu"]), mu_sigma_init, rtol=0.05
          )
  
imports: import io
  import operator
  from contextlib import nullcontext
  import cloudpickle
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import pymc
  import pymc.variational.opvi
  from pymc.pytensorf import intX
  from pymc.variational.inference import ADVI, ASVGD, SVGD, FullRankADVI
  from pymc.variational.opvi import NotImplementedInference
  from tests import models
label_desc: Use image node_id 9 for calling a global function with example usage: test_fit_start(inference_spec, simple_model) without return types