code: def test_minimize_sparse_resource_variable_nuclear():
      # TODO:
      #       to address issue #347 and #36764.
      for dtype in _dtypes_with_checking_system(
          use_gpu=test_utils.is_gpu_available(),
          system=platform.system(),
      ):
          var0 = tf.Variable([[1.0, 2.0]], dtype=dtype)
  
          def loss():
              x = tf.constant([[4.0], [5.0]], dtype=dtype)
              pred = tf.matmul(tf.nn.embedding_lookup([var0], [0]), x)
              return pred * pred
  
          # the gradient based on the current loss function
          grads0_0 = 32 * 1.0 + 40 * 2.0
          grads0_1 = 40 * 1.0 + 50 * 2.0
          grads0 = tf.constant([[grads0_0, grads0_1]], dtype=dtype)
          top_singular_vector0 = (
              cg_lib.ConditionalGradient._top_singular_vector(grads0)
          )
  
          learning_rate = 0.1
          lambda_ = 0.1
          ord = "nuclear"
          opt = cg_lib.ConditionalGradient(
              learning_rate=learning_rate, lambda_=lambda_, ord=ord
          )
          _ = opt.minimize(loss, var_list=[var0])
  
          # Validate updated params
          test_utils.assert_allclose_according_to_type(
              [
                  [
                      1.0 * learning_rate
                      - (1 - learning_rate)
                      * lambda_
                      * top_singular_vector0[0][0],
                      2.0 * learning_rate
                      - (1 - learning_rate)
                      * lambda_
                      * top_singular_vector0[0][1],
                  ]
              ],
              var0.numpy(),
          )
  
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 7 for calling a global function with example usage: test_minimize_sparse_resource_variable_nuclear() and returns: unknown