code: def test_fit(ray_start_4_cpus):
      train_dataset = ray.data.from_pandas(train_df)
      valid_dataset = ray.data.from_pandas(test_df)
      trainer = XGBoostTrainer(
          scaling_config=scale_config,
          label_column="target",
          params=params,
          datasets={
              TRAIN_DATASET_KEY: train_dataset,
              "valid": valid_dataset,
          },
      )
      trainer.fit()
  
imports: import json
  import pandas
  import pytest
  import xgboost
  from sklearn.datasets import load_breast_cancer
  from sklearn.model_selection import train_test_split
  import ray
  from ray import train, tune
  from ray.train import ScalingConfig
  from ray.train.constants import TRAIN_DATASET_KEY
  from ray.train.xgboost import XGBoostTrainer
label_desc: Use image node_id 4 for calling a global function with example usage: test_fit(ray_start_4_cpus) without return types