code: def _numpy_sequence_lookup(
      self, table, indices, values, batch_size, max_sequence_length, dim
  ):
      # First we truncate to max_sequence_length.
      valid_entries = np.nonzero(indices[:, 1] < max_sequence_length)[0]
      indices = indices[valid_entries]
      values = values[valid_entries]
      # Then we gather the values
      lookup = table[values]
      # Then we scatter them into the result array.
      scatter_result = np.zeros([batch_size, max_sequence_length, dim])
      for i, index in enumerate(indices):
          scatter_result[index[0], index[1], :] = lookup[i]
      return scatter_result
  
imports: import numpy
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.ops import init_ops_v2
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import test
  from tensorflow.python.tpu import tpu_embedding_for_serving
  from tensorflow.python.tpu import tpu_embedding_v2_utils
  from tensorflow.python.util import nest
label_desc: Use image node_id 14 for calling the TPUEmbeddingForServingTest obj's underlying member method code with example usage: obj._numpy_sequence_lookup(table, indices, values, batch_size, max_sequence_length, dim) and returns: scatter_result