code: def test_class_weights_map_fn_with_sample_weight(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], [0.5, 0.5]])
      y = np.array([[1, 0], [0, 1]])
      sw = np.array([1.0, 1.0])
  
      with self.assertRaisesRegex(
          ValueError,
          "You cannot `class_weight` and `sample_weight` at the same time.",
      ):
          class_weights_map_fn(x, y, sw)
  
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 10 for calling the TestTFDatasetAdapter obj's underlying member method code with example usage: obj.test_class_weights_map_fn_with_sample_weight() without return types