class_docstr: CatBoost model: https://catboost.ai/
  
  Hyperparameter options: https://catboost.ai/en/docs/references/training-parameters
class_docstr_tok: ["CatBoost","model",":","https",":","\/\/catboost.ai\/","Hyperparameter","options",":","https",":","\/\/catboost.ai\/en\/docs\/references\/training-parameters"]
code: def _estimate_iter_in_time_gpu(
      self,
      *,
      X,
      eval_set,
      time_limit,
      verbose,
      params,
      num_rows_train,
      time_start,
      model_type,
  ):
      import math
      import pickle
      import sys
  
      modifier = min(1.0, 10000 / num_rows_train)
      num_sample_iter_max = max(round(modifier * 50), 2)
      time_left_start = time_limit - (time.time() - time_start)
      if (
          time_left_start <= time_limit * 0.4
      ):  # if 60% of time was spent preprocessing, likely not enough time to train model
          raise TimeLimitExceeded
      default_iters = params["iterations"]
      params_init = params.copy()
      num_sample_iter = min(
          num_sample_iter_max, params_init["iterations"]
      )
      params_init["iterations"] = num_sample_iter
      sample_model = model_type(
          **params_init,
      )
      sample_model.fit(
          X,
          eval_set=eval_set,
          use_best_model=True,
          verbose=verbose,
      )
  
      time_left_end = time_limit - (time.time() - time_start)
      time_taken_per_iter = (
          time_left_start - time_left_end
      ) / num_sample_iter
      estimated_iters_in_time = round(
          time_left_end / time_taken_per_iter
      )
  
      available_mem = ResourceManager.get_available_virtual_mem()
      if self.problem_type == SOFTCLASS:
          model_size_bytes = 1  # skip memory check
      else:
          model_size_bytes = sys.getsizeof(pickle.dumps(sample_model))
  
      max_memory_proportion = 0.3
      mem_usage_per_iter = model_size_bytes / num_sample_iter
      max_memory_iters = math.floor(
          available_mem * max_memory_proportion / mem_usage_per_iter
      )
  
      final_iters = min(
          default_iters, min(max_memory_iters, estimated_iters_in_time)
      )
      return final_iters
  
imports: import logging
  import math
  import os
  import time
  import numpy
  import pandas
  from autogluon.common.features.types import R_BOOL, R_CATEGORY, R_FLOAT, R_INT
  from autogluon.common.utils.pandas_utils import get_approximate_df_mem_usage
  from autogluon.common.utils.resource_utils import ResourceManager
  from autogluon.common.utils.try_import import try_import_catboost
  from autogluon.core.constants import MULTICLASS, PROBLEM_TYPES_CLASSIFICATION, QUANTILE, SOFTCLASS
  from autogluon.core.models import AbstractModel
  from autogluon.core.models._utils import get_early_stopping_rounds
  from autogluon.core.utils.exceptions import TimeLimitExceeded
  from .callbacks import EarlyStoppingCallback, MemoryCheckCallback, TimeCheckCallback
  from .catboost_utils import get_catboost_metric_from_ag_metric
  from .hyperparameters.parameters import get_param_baseline
  from .hyperparameters.searchspaces import get_default_searchspace
label_desc: Use image node_id 7 for calling the CatBoostModel obj's underlying member method code with example usage: obj._estimate_iter_in_time_gpu() and returns: final_iters