code: def testDtype(self):
      t_0 = ops.convert_to_tensor(
          [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]
      )
      self.assertEqual(dtypes.float32, t_0.dtype)
  
      t_1 = ops.convert_to_tensor(
          [
              [0.0, 0.0, 0.0],
              constant_op.constant(
                  [0.0, 0.0, 0.0], dtype=dtypes.float64
              ),
              [0.0, 0.0, 0.0],
          ]
      )
      self.assertEqual(dtypes.float64, t_1.dtype)
  
      t_2 = ops.convert_to_tensor(
          [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]],
          dtype=dtypes.float64,
      )
      self.assertEqual(dtypes.float64, t_2.dtype)
  
      t_3 = ops.convert_to_tensor(
          [
              [0.0, 0.0, 0.0],
              constant_op.constant(
                  [0.0, 0.0, 0.0], dtype=dtypes.float64
              ),
              [0.0, 0.0, 0.0],
          ],
          dtype=dtypes.float32,
      )
      self.assertEqual(dtypes.float32, t_3.dtype)
  
      t_4 = ops.convert_to_tensor(
          [constant_op.constant([0.0, 0.0, 0.0], dtype=dtypes.float64)],
          dtype=dtypes.float32,
      )
      self.assertEqual(dtypes.float32, t_4.dtype)
  
      with self.assertRaises(TypeError):
          ops.convert_to_tensor(
              [
                  constant_op.constant(
                      [0.0, 0.0, 0.0], dtype=dtypes.float32
                  ),
                  constant_op.constant(
                      [0.0, 0.0, 0.0], dtype=dtypes.float64
                  ),
                  [0.0, 0.0, 0.0],
              ]
          )
  
imports: import numpy
  from tensorflow.python import tf2
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the AutomaticStackingTest obj's underlying member method code with example usage: obj.testDtype() without return types