code: def test_var_replacement():
      X_mean = pm.floatX(np.linspace(0, 10, 10))
      y = pm.floatX(np.random.normal(X_mean * 4, 0.05))
      inp_size = pytensor.shared(
          np.array(10, dtype="int64"), name="inp_size"
      )
      with pm.Model():
          inp = pm.Normal("X", X_mean, size=(inp_size,))
          coef = pm.Normal("b", 4.0)
          mean = inp * coef
          pm.Normal("y", mean, 0.1, shape=inp.shape, observed=y)
          advi = pm.fit(100)
          assert advi.sample_node(mean).eval().shape == (10,)
  
          inp_size.set_value(11)
          x_new = pm.floatX(np.linspace(0, 10, 11))
          assert advi.sample_node(
              mean, more_replacements={inp: x_new}
          ).eval().shape == (11,)
  
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 17 for calling a global function with example usage: test_var_replacement() without return types