code: def test_scaling_config_validate_config_prohibited_class():
      # Check for prohibited keys
      scaling_config = {"num_workers": 2}
      with pytest.raises(ValueError) as exc_info:
          ensure_only_allowed_dataclass_keys_updated(
              ScalingConfig(**scaling_config),
              ["trainer_resources"],
          )
      assert "num_workers" in str(exc_info.value)
      assert "to be updated" in str(exc_info.value)
  
imports: import pytest
  import ray
  from ray.train import Checkpoint, CheckpointConfig, ScalingConfig
  from ray.air._internal.config import ensure_only_allowed_dataclass_keys_updated
  from ray.data.preprocessor import Preprocessor
  from ray.train.trainer import BaseTrainer
label_desc: Use image node_id 6 for calling a global function with example usage: test_scaling_config_validate_config_prohibited_class() without return types