code: def test_ctors(self):
      if theano.configdefaults.python_int_bitwidth() == 32:
          assert shared(7).type == theano.tensor.iscalar, shared(7).type
      else:
          assert shared(7).type == theano.tensor.lscalar, shared(7).type
      assert shared(7.0).type == theano.tensor.dscalar
      assert shared(np.float32(7)).type == theano.tensor.fscalar
  
      # test tensor constructor
      b = shared(np.zeros((5, 5), dtype="int32"))
      assert b.type == TensorType("int32", broadcastable=[False, False])
      b = shared(np.random.rand(4, 5))
      assert b.type == TensorType(
          "float64", broadcastable=[False, False]
      )
      b = shared(np.random.rand(5, 1, 2))
      assert b.type == TensorType(
          "float64", broadcastable=[False, False, False]
      )
  
      assert shared([]).type == generic
  
      def badfunc():
          shared(7, bad_kw=False)
  
      self.assertRaises(TypeError, badfunc)
  
file_path: Theano/theano/compile/tests/test_shared.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import unittest
  import theano
  from theano.tensor import Tensor, TensorType
  from theano.compile.sharedvalue import shared
  from theano.compile.sharedvalue import SharedVariable
  from theano.compile.sharedvalue import generic
label_desc: Use image node_id 1 for calling the Test_SharedVariable obj's underlying member method code with example usage: obj.test_ctors() without return types