code: def test_batched_multi_hot(self):
      input_data = np.array([[3, 2, 0, 1], [3, 2, 0, 1]])
      expected_output = np.array(
          [[1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0]]
      )
      num_tokens = 6
      expected_output_shape = (2, num_tokens)
  
      # Test call on layer directly.
      layer = layers.CategoryEncoding(
          num_tokens=num_tokens, output_mode="multi_hot"
      )
      output_data = layer(input_data)
      self.assertAllClose(expected_output, output_data)
      self.assertEqual(expected_output_shape, output_data.shape)
  
      # Test symbolic call.
      output = layer(
          layers.Input(batch_shape=input_data.shape, dtype="int32")
      )
      self.assertEqual(expected_output_shape, output.shape)
      self.assertEqual("float32", output.dtype)
  
file_path: keras/keras/layers/preprocessing/category_encoding_test.py
imports: import numpy
  from tensorflow import data
  from keras import layers
  from keras import testing
label_desc: Use image node_id 4 for calling the CategoryEncodingTest obj's underlying member method code with example usage: obj.test_batched_multi_hot() without return types