def METHOD_NAME(self):
    x = np.random.random((4, 2))
    y = np.array([[0], [1], [2], [3]], dtype="int64")
    sw = np.array([0.5, 0.5, 0.5, 0.5])
    base_ds = tf.data.Dataset.from_tensor_slices((x, y, sw)).batch(16)
    class_weight = {0: 0.1, 1: 0.2, 2: 0.3, 3: 0.4}
    with self.assertRaisesRegex(
        ValueError,
        "You cannot `class_weight` and `sample_weight` at the same time.",
    ):
        tf_dataset_adapter.TFDatasetAdapter(
            base_ds, class_weight=class_weight
        )