code: def _aggregate_one(values, mode):
      if mode == encoding_stage.StateAggregationMode.SUM:
          return tf.reduce_sum(tf.stack(values), axis=0)
      elif mode == encoding_stage.StateAggregationMode.MIN:
          return tf.reduce_min(tf.stack(values), axis=0)
      elif mode == encoding_stage.StateAggregationMode.MAX:
          return tf.reduce_max(tf.stack(values), axis=0)
      elif mode == encoding_stage.StateAggregationMode.STACK:
          return tf.stack(values)
  
imports: import collections
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow.python.framework import test_util
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import core_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import encoding_stage
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import gather_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 3 for calling a global function with example usage: _aggregate_one(values, mode) and returns: tf, tf, tf, tf