code: def test_validation(ray_start_4_cpus):
      train_dataset = ray.data.from_pandas(train_df)
      valid_dataset = ray.data.from_pandas(test_df)
      with pytest.raises(KeyError, match=TRAIN_DATASET_KEY):
          SklearnTrainer(
              estimator=RandomForestClassifier(),
              scaling_config=scale_config,
              label_column="target",
              datasets={"valid": valid_dataset},
          )
      with pytest.raises(KeyError, match="cv"):
          SklearnTrainer(
              estimator=RandomForestClassifier(),
              scaling_config=scale_config,
              label_column="target",
              datasets={
                  TRAIN_DATASET_KEY: train_dataset,
                  "cv": valid_dataset,
              },
          )
      with pytest.raises(
          ValueError, match="are not allowed to be updated"
      ):
          SklearnTrainer(
              estimator=RandomForestClassifier(),
              scaling_config=ScalingConfig(num_workers=2),
              label_column="target",
              datasets={
                  TRAIN_DATASET_KEY: train_dataset,
                  "valid": valid_dataset,
              },
          )
      with pytest.raises(ValueError, match="parallelize_cv"):
          SklearnTrainer(
              estimator=RandomForestClassifier(),
              scaling_config=ScalingConfig(
                  trainer_resources={"GPU": 1}
              ),
              label_column="target",
              cv=5,
              parallelize_cv=True,
              datasets={
                  TRAIN_DATASET_KEY: train_dataset,
                  "valid": valid_dataset,
              },
          )
  
file_path: ray/python/ray/train/tests/test_sklearn_trainer.py
imports: import pandas
  import pytest
  from sklearn.datasets import load_breast_cancer
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.model_selection import train_test_split
  import ray
  from ray import tune
  from ray.train import ScalingConfig
  from ray.train.constants import TRAIN_DATASET_KEY
  from ray.train.sklearn import SklearnTrainer
label_desc: Use image node_id 6 for calling a global function with example usage: test_validation(ray_start_4_cpus) without return types