code: def test_ctors(self):
      if PYTHON_INT_BITWIDTH == 32:
          assert shared(7).type == iscalar, shared(7).type
      else:
          assert shared(7).type == lscalar, shared(7).type
      assert shared(7.0).type == dscalar
      assert shared(np.float32(7)).type == fscalar
  
      # test tensor constructor
      b = shared(np.zeros((5, 5), dtype="int32"))
      assert b.type == TensorType("int32", shape=(None, None))
      b = shared(np.random.random((4, 5)))
      assert b.type == TensorType("float64", shape=(None, None))
      b = shared(np.random.random((5, 1, 2)))
      assert b.type == TensorType("float64", shape=(None, None, None))
  
      assert shared([]).type == generic
  
      def badfunc():
          shared(7, bad_kw=False)
  
      with pytest.raises(TypeError):
          badfunc()
  
file_path: pytensor/tests/compile/test_shared.py
imports: import numpy
  import pytest
  import pytensor.tensor
  from pytensor.compile.sharedvalue import SharedVariable, shared
  from pytensor.configdefaults import config
  from pytensor.link.c.type import generic
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.tensor.type import TensorType, bscalar, bvector, dscalar, dvector, fscalar, fvector, iscalar, ivector, lscalar, lvector, wscalar, wvector
  from pytensor.utils import PYTHON_INT_BITWIDTH
label_desc: Use image node_id 1 for calling the TestSharedVariable obj's underlying member method code with example usage: obj.test_ctors() without return types