code: def test_map_per_key_reductions(
      self,
      key,
      key_vocab,
      reductions,
      x,
      reduce_instance_dims,
      expected_results,
  ):
      with tf.compat.v1.Graph().as_default():
          key = _value_to_tensor(key)
          key_vocab = tf.constant(key_vocab)
          reductions = tuple([tf.constant(t) for t in reductions])
          x = _value_to_tensor(x)
          expected_results = tuple(
              tf.constant(t) for t in expected_results
          )
          results = tf_utils.map_per_key_reductions(
              reductions, key, key_vocab, x, reduce_instance_dims
          )
          with tf.compat.v1.Session() as sess:
              sess.run(tf.compat.v1.tables_initializer())
              output = sess.run(results)
              for result, expected_result in zip(
                  output, expected_results
              ):
                  self.assertAllEqual(result, expected_result)
  
imports: import os
  import numpy
  from packaging import version
  import tensorflow
  from tensorflow_transform import analyzers
  from tensorflow_transform import annotators
  from tensorflow_transform import tf_utils
  from tensorflow_transform import test_case
  from tensorflow.python.framework import composite_tensor
label_desc: Use image node_id 28 for calling the TFUtilsTest obj's underlying member method code with example usage: obj.test_map_per_key_reductions(key, key_vocab, reductions, x, reduce_instance_dims, expected_results) without return types