code: def test_minimize_with_2D_indicies_for_embedding_lookup_nuclear():
      # This test invokes the ResourceSparseApplyConditionalGradient
      # operation.
      var0 = tf.Variable(tf.ones([2, 2]))
  
      def loss():
          return tf.math.reduce_sum(tf.nn.embedding_lookup(var0, [[1]]))
  
      # the gradient for this loss function:
      grads0 = tf.constant([[0, 0], [1, 1]], dtype=tf.float32)
      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])
  
      # Run 1 step of cg_op
      test_utils.assert_allclose_according_to_type(
          [
              learning_rate * 1
              - (1 - learning_rate)
              * lambda_
              * top_singular_vector0[1][0],
              learning_rate * 1
              - (1 - learning_rate)
              * lambda_
              * top_singular_vector0[1][1],
          ],
          var0[1],
      )
  
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 12 for calling a global function with example usage: test_minimize_with_2D_indicies_for_embedding_lookup_nuclear() and returns: tf