code: def _dtypes_to_test(use_gpu):
      # Based on issue #347 in the following link,
      #        "https://github.com/tensorflow/addons/issues/347"
      # tf.half is not registered for 'ResourceScatterUpdate' OpKernel
      # for 'GPU' devices.
      # So we have to remove tf.half when testing with gpu.
      # The function "_DtypesToTest" is from
      #       "https://github.com/tensorflow/tensorflow/blob/5d4a6cee737a1dc6c20172a1dc1
      #        5df10def2df72/tensorflow/python/kernel_tests/conv_ops_3d_test.py#L53-L62"
      #
      #  Update cpu to use tf.half once issue in TF2.4 is fixed: https://github.com/tensorflow/tensorflow/issues/45136
      if use_gpu:
          return [tf.float32, tf.float64]
      else:
          return [tf.float32, tf.float64]
  
imports: import numpy
  import pytest
  import platform
  import tensorflow
  from tensorflow_addons.utils import test_utils
  from tensorflow_addons.optimizers import conditional_gradient
label_desc: Use image node_id 1 for calling a global function with example usage: _dtypes_to_test(use_gpu) and returns: list, list