docstr: Tests cast(x) to different tf.
code: def _testTypes(self, x, use_gpu=False):
      """Tests cast(x) to different tf."""
      if use_gpu:
          type_list = [
              np.float32,
              np.float64,
              np.int64,
              np.complex64,
              np.complex128,
          ]
      else:
          type_list = [
              np.float32,
              np.float64,
              np.int32,
              np.int64,
              np.complex64,
              np.complex128,
          ]
      for from_type in type_list:
          for to_type in type_list:
              self._test(x.astype(from_type), to_type, use_gpu)
  
      self._test(x.astype(np.bool_), np.float32, use_gpu)
      self._test(x.astype(np.uint8), np.float32, use_gpu)
      if not use_gpu:
          self._test(x.astype(np.bool_), np.int32, use_gpu)
          self._test(x.astype(np.int32), np.int32, use_gpu)
  
imports: import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_state_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the CastOpTest obj's underlying member method code with example usage: obj._testTypes(x, use_gpu) without return types