code: def get_num_trees(booster: lgbm.Booster) -> int:
      return booster.current_iteration()
  
file_path: ray/python/ray/train/tests/test_lightgbm_predictor.py
imports: import re
  import lightgbm
  import numpy
  import pandas
  import pytest
  from ray.air.constants import MAX_REPR_LENGTH
  from ray.air.util.data_batch_conversion import _convert_pandas_to_batch_type
  from ray.train.lightgbm import LightGBMCheckpoint, LightGBMPredictor
  from ray.train.predictor import TYPE_TO_ENUM
  from ray.train.tests.dummy_preprocessor import DummyPreprocessor
label_desc: Use image node_id 1 for calling a global function with example usage: get_num_trees(booster) and returns: booster