code: def test_class_weights_map_fn_nested_y(self):
      class_weight = {0: 0.1, 1: 0.2, 2: 0.3, 3: 0.4}
      class_weights_map_fn = (
          tf_dataset_adapter.make_class_weight_map_fn(class_weight)
      )
  
      x = np.array([[0.5, 0.5]])
      y1 = np.array([1])
      y2 = np.array([0])
  
      with self.assertRaisesRegex(
          ValueError,
          "`class_weight` is only supported for Models with a single output.",
      ):
          class_weights_map_fn(x, (y1, y2))
  
file_path: keras/keras/trainers/data_adapters/tf_dataset_adapter_test.py
imports: from unittest import mock
  import numpy
  import tensorflow
  from keras import testing
  from keras.trainers.data_adapters import tf_dataset_adapter
label_desc: Use image node_id 11 for calling the TestTFDatasetAdapter obj's underlying member method code with example usage: obj.test_class_weights_map_fn_nested_y() without return types