code: def DtypesToTest(use_gpu):
      # double datatype is currently not supported for convolution ops
      # on the ROCm platform
      optional_float64 = (
          [] if test.is_built_with_rocm() else [dtypes.float64]
      )
      if use_gpu:
          if not test_util.GpuSupportsHalfMatMulAndConv():
              return optional_float64 + [dtypes.float32]
          else:
              # It is important that float32 comes before float16 here,
              # as we will be using its gradients as reference for fp16 gradients.
              return optional_float64 + [dtypes.float32, dtypes.float16]
      else:
          return optional_float64 + [
              dtypes.float32,
              dtypes.float16,
              dtypes.bfloat16,
          ]
  
imports: import math
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util.compat import collections_abc
  from tensorflow.python.eager import context
label_desc: Use image node_id 1 for calling a global function with example usage: DtypesToTest(use_gpu) and returns: unknown, unknown, unknown