code: def test_extend_reduced_batch_with_y_counts(self):
      initial_reduction = tf_utils.ReducedBatchWeightedCounts(
          unique_x=tf.constant(["foo", "bar"]),
          summed_weights_per_x=tf.constant([3.0, 4.0]),
          summed_positive_per_x_and_y=tf.constant(
              [[1.0, 4.0], [1.0, 1.0]]
          ),
          counts_per_x=tf.constant([2, 5], tf.int64),
      )
      y = tf.constant([0, 1, 1, 1, 0, 1, 1], tf.int64)
      extended_batch = tf_utils.extend_reduced_batch_with_y_counts(
          initial_reduction, y
      )
      self.assertAllEqual(
          self.evaluate(extended_batch.unique_x),
          np.array([b"foo", b"bar", b"global_y_count_sentinel"]),
      )
      self.assertAllClose(
          self.evaluate(extended_batch.summed_weights_per_x),
          np.array([3.0, 4.0, 7.0]),
      )
      self.assertAllClose(
          self.evaluate(extended_batch.summed_positive_per_x_and_y),
          np.array([[1.0, 4.0], [1.0, 1.0], [2.0, 5.0]]),
      )
      self.assertAllClose(
          self.evaluate(extended_batch.counts_per_x),
          np.array([2.0, 5.0, 7.0]),
      )
  
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 31 for calling the TFUtilsTest obj's underlying member method code with example usage: obj.test_extend_reduced_batch_with_y_counts() without return types