code: def test_resume_from_checkpoint(ray_start_6_cpus, tmpdir):
      train_dataset = ray.data.from_pandas(train_df)
      valid_dataset = ray.data.from_pandas(test_df)
      trainer = LightGBMTrainer(
          scaling_config=scale_config,
          label_column="target",
          params=params,
          num_boost_round=5,
          datasets={
              TRAIN_DATASET_KEY: train_dataset,
              "valid": valid_dataset,
          },
      )
      result = trainer.fit()
      model = LightGBMTrainer.get_model(result.checkpoint)
      assert get_num_trees(model) == 5
  
      trainer = LightGBMTrainer(
          scaling_config=scale_config,
          label_column="target",
          params=params,
          num_boost_round=10,
          datasets={
              TRAIN_DATASET_KEY: train_dataset,
              "valid": valid_dataset,
          },
          resume_from_checkpoint=result.checkpoint,
      )
      result = trainer.fit()
      checkpoint = result.checkpoint
      model = LightGBMTrainer.get_model(checkpoint)
      assert get_num_trees(model) == 10
  
imports: import math
  import lightgbm
  import pandas
  import pytest
  from sklearn.datasets import load_breast_cancer
  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.lightgbm import LightGBMTrainer
label_desc: Use image node_id 5 for calling a global function with example usage: test_resume_from_checkpoint(ray_start_6_cpus, tmpdir) without return types