code: def test_change_specify_shape_size_multivariate():
      with pytensor.config.change_flags(mode=Mode("py")):
          batch, supp = pt.iscalars("batch", "supp")
          x = pt.random.multivariate_normal(
              pt.zeros(supp), pt.eye(supp), size=(batch,)
          )
          x = pt.specify_shape(x, (5, 3))
          x.eval({batch: 5, supp: 3}).shape == (5, 3)
  
          new_x = change_dist_size(x, (10, 5))
          # SpecifyShape is still present in the support dimension
          assert isinstance(new_x.owner.op, SpecifyShape)
          assert new_x.eval({supp: 3}).shape == (10, 5, 3)
          with pytest.raises(
              AssertionError,
              match=re.escape("expected (None, None, 3)"),
          ):
              new_x.eval({supp: 4})
  
          new_x = change_dist_size(x, (10, 5), expand=True)
          # SpecifyShape is still present in both support and batch dimension
          assert isinstance(new_x.owner.op, SpecifyShape)
          new_x.eval({batch: 5, supp: 3}).shape == (10, 5, 5, 3)
          with pytest.raises(
              AssertionError,
              match=re.escape("expected (None, None, 5, 3)"),
          ):
              new_x.eval({batch: 6, supp: 3}).shape == (10, 5, 5, 3)
  
imports: import re
  import warnings
  import numpy
  import pytensor
  import pytest
  from pytensor import tensor
  from pytensor.compile.mode import Mode
  from pytensor.graph import Constant, ancestors
  from pytensor.tensor import TensorVariable
  from pytensor.tensor.random import normal
  from pytensor.tensor.shape import SpecifyShape
  import pymc
  from pymc import ShapeError
  from pymc.distributions.shape_utils import broadcast_dist_samples_shape, change_dist_size, convert_dims, convert_shape, convert_size, get_support_shape, get_support_shape_1d, rv_size_is_none, to_tuple
  from pymc.model import Model
label_desc: Use image node_id 8 for calling a global function with example usage: test_change_specify_shape_size_multivariate() without return types