code: def test_dynamic_decode_rnn_with_scheduled_embedding_training_sampler():
      policy = tf.keras.mixed_precision.global_policy()
      sequence_length = [3, 4, 3, 1]
      batch_size = 4
      input_depth = 7
      cell_depth = 10
      vocab_size = 12
      max_time = max(sequence_length)
  
      embedding = tf.keras.layers.Embedding(vocab_size, input_depth)
      cell = tf.keras.layers.LSTMCell(cell_depth)
      sampler = sampler_py.ScheduledEmbeddingTrainingSampler(
          sampling_probability=tf.constant(1.0), embedding_fn=embedding
      )
      my_decoder = basic_decoder.BasicDecoder(
          cell=cell, sampler=sampler
      )
  
      inputs = tf.random.uniform([batch_size, max_time, input_depth])
      initial_state = cell.get_initial_state(
          batch_size=batch_size, dtype=policy.compute_dtype
      )
      final_outputs, _, _ = my_decoder(
          inputs,
          initial_state=initial_state,
          sequence_length=sequence_length,
      )
  
      assert final_outputs.rnn_output.dtype == policy.compute_dtype
  
file_path: addons/tensorflow_addons/seq2seq/tests/decoder_test.py
imports: import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.seq2seq import basic_decoder
  from tensorflow_addons.seq2seq import decoder
  from tensorflow_addons.seq2seq import sampler
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_dynamic_decode_rnn_with_scheduled_embedding_training_sampler() without return types