code: def test_constant_python_complex_with_dtype_arg(self):
      # Test that python float can be implicity casted to any complex types.
      a = constant_op.constant([1.0j, 2.0j, 3.0j], dtypes.complex64)
      self.assertIsInstance(a, tensor.Tensor)
      self.assertEqual(a.dtype, dtypes.complex64)
  
      a = constant_op.constant([1.0j, 2.0j, 3.0j], dtypes.complex128)
      self.assertIsInstance(a, tensor.Tensor)
      self.assertEqual(a.dtype, dtypes.complex128)
  
imports: from absl.testing import parameterized
  import numpy
  from google.protobuf import text_format
  from tensorflow.core.framework import graph_pb2
  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 flexible_dtypes
  from tensorflow.python.framework import importer
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework.weak_tensor import WeakTensor
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import weak_tensor_ops
  from tensorflow.python.ops import weak_tensor_test_util
  from tensorflow.python.ops.parallel_for import control_flow_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 9 for calling the WeakTensorConstantOpTest obj's underlying member method code with example usage: obj.test_constant_python_complex_with_dtype_arg() without return types