class_docstr: Callback to ensure memory usage is safe, otherwise early stops the model to avoid OOM errors.
  
  This callback is CatBoost specific.
  
  Parameters
  ----------
  period : int, default = 10
      Number of iterations between checking memory status. Higher values are less precise but use less compute.
  verbose : bool, default = False
      Whether to log information on memory status even if memory usage is low.
code: def after_iteration(self, info):
      iteration = info.iteration
      if iteration % self._cur_period == 0:
          not_enough_memory = self.memory_check(iteration)
          if not_enough_memory:
              logger.log(
                  20,
                  f"\tRan low on memory, early stopping on iteration {info.iteration}.",
              )
              return False
      return True
  
file_path: autogluon/tabular/src/autogluon/tabular/models/catboost/callbacks.py
imports: import logging
  import time
  from autogluon.common.utils.resource_utils import ResourceManager
  from .catboost_utils import CATBOOST_QUANTILE_PREFIX
label_desc: Use image node_id 2 for calling the MemoryCheckCallback obj's underlying member method code with example usage: obj.after_iteration(info) and returns: True, False