code: def test_last_activations_in_sequence(self):
      # Force graph mode
      with tf.compat.v1.Graph().as_default():
          input_tensor = tf.constant(INPUT_TENSOR)
          input_tensor = tf.expand_dims(input_tensor, axis=0)
          batch = tf.tile(input_tensor, tf.constant([5, 1, 1]))
          logging.info(batch)
          lengths = tf.constant([2, 4, 6, 8, 10])
          output = utils.last_activations_in_sequence(batch, lengths)
          with self.test_session() as sess:
              output = sess.run(output)
          self.assertAllEqual(
              output, np.array([[1, 1], [3, 3], [5, 5], [7, 7], [9, 9]])
          )
  
imports: from absl import logging
  from model_search import utils
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_last_activations_in_sequence() without return types