code: def test_embedding_gradient_sparse():
      from bigdl.nano.tf.keras.layers import Embedding
      from bigdl.nano.tf.keras import Sequential
      import tensorflow as tf
  
      model = Sequential()
      model.add(
          Embedding(
              1000,
              64,
              input_length=10,
              embeddings_regularizer=tf.keras.regularizers.L2(),
          )
      )
      model.compile("rmsprop", "mse")
      input_array = np.random.randint(1000, size=(32, 10))
  
      with tf.GradientTape() as tape:
          output = model(input_array)
          labels = tf.zeros_like(output)
          loss_value = model.compiled_loss(
              output, labels, regularization_losses=model.losses
          )
          grads = tape.gradient(loss_value, model.trainable_variables)
  
          print(grads)
          for grad in grads:
              assert isinstance(grad, tf.IndexedSlices)
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_embedding_gradient_sparse() without return types