code: def test_fixed_shape_variable_basic():
      x = TensorVariable(TensorType("int64", shape=(4,)), None)
      assert x.type.shape == (4,)
      assert isinstance(x.shape.owner.op, Shape)
  
      shape_fn = pytensor.function([x], x.shape)
      opt_shape = shape_fn.maker.fgraph.outputs[0]
      assert isinstance(opt_shape.owner.op, DeepCopyOp)
      assert isinstance(opt_shape.owner.inputs[0], Constant)
      assert np.array_equal(opt_shape.owner.inputs[0].data, (4,))
  
      x = TensorConstant(
          TensorType("int64", shape=(None, None)),
          np.array([[1, 2], [2, 3]]),
      )
      assert x.type.shape == (2, 2)
  
      with pytest.raises(ValueError):
          TensorConstant(
              TensorType("int64", shape=(1, None)),
              np.array([[1, 2], [2, 3]]),
          )
  
imports: from copy import copy
  import numpy
  import pytest
  from numpy.testing import assert_array_equal, assert_equal, assert_string_equal
  import pytensor
  import tests.unittest_tools
  from pytensor.compile import DeepCopyOp
  from pytensor.compile.mode import get_default_mode
  from pytensor.graph.basic import Constant, equal_computations
  from pytensor.tensor import get_vector_length
  from pytensor.tensor.basic import constant
  from pytensor.tensor.elemwise import DimShuffle
  from pytensor.tensor.math import dot, eq, matmul
  from pytensor.tensor.shape import Shape
  from pytensor.tensor.subtensor import AdvancedSubtensor, Subtensor, inc_subtensor, set_subtensor
  from pytensor.tensor.type import TensorType, cscalar, dmatrix, dscalar, dvector, iscalar, ivector, matrices, matrix, scalar, tensor3
  from pytensor.tensor.type_other import MakeSlice, NoneConst
  from pytensor.tensor.variable import DenseTensorConstant, DenseTensorVariable, TensorConstant, TensorVariable
  from tests.tensor.utils import random
label_desc: Use image node_id 11 for calling a global function with example usage: test_fixed_shape_variable_basic() without return types