code: def test_variable_creation(self):
      weight = np.ones((3, 3))
      var1 = tf_utils.create_variable(weight, name="var1", shape=(3, 3))
      self.assertShapesEqual(var1.shape, (3, 3))
  
      var2 = tf_utils.create_variable(5, name="var2", shape=(4, 3))
      self.assertShapesEqual(var2.shape, (4, 3))
      np.testing.assert_array_almost_equal(
          self.eval(var2), 5 * np.ones((4, 3))
      )
  
      initializer = init.Normal()
      var3 = tf_utils.create_variable(
          initializer, name="var3", shape=(4, 7)
      )
      self.assertShapesEqual(var3.shape, (4, 7))
  
      weight = tf.Variable(np.ones((3, 3)), dtype=tf.float32)
      var4 = tf_utils.create_variable(weight, name="var4", shape=(3, 3))
      self.assertShapesEqual(var4.shape, (3, 3))
      self.assertIs(var4, weight)
  
      weight = np.ones((3, 4))
      with self.assertRaisesRegexp(
          ValueError, "Cannot create variable"
      ):
          tf_utils.create_variable(weight, name="var5", shape=(3, 3))
  
      weight = tf.Variable(np.ones((4, 3)), dtype=tf.float32)
      with self.assertRaisesRegexp(
          ValueError, "Cannot create variable"
      ):
          tf_utils.create_variable(weight, name="var6", shape=(3, 3))
  
imports: import pytest
  import numpy
  import tensorflow
  from tensorflow.errors import FailedPreconditionError
  from neupy import init
  from neupy.utils import tf_utils, asfloat
  from base import BaseTestCase
label_desc: Use image node_id 12 for calling the TFUtilsTestCase obj's underlying member method code with example usage: obj.test_variable_creation() without return types