docstr: Returns TensorFlow data type for numpy type.
code: def _toDataType(self, dtype):
      """Returns TensorFlow data type for numpy type."""
      if dtype == np.float32:
          return dtypes.float32
      elif dtype == np.float64:
          return dtypes.float64
      elif dtype == np.int32:
          return dtypes.int32
      elif dtype == np.int64:
          return dtypes.int64
      elif dtype == np.bool_:
          return dtypes.bool
      elif dtype == np.complex64:
          return dtypes.complex64
      elif dtype == np.complex128:
          return dtypes.complex128
      else:
          return None
  
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 1 for calling the CastOpTest obj's underlying member method code with example usage: obj._toDataType(dtype) and returns: dtypes, dtypes, dtypes, dtypes, dtypes, dtypes, dtypes, None