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 __init__(self, period: int = 10, verbose=False):
      self.period = period
      self.init_mem_rss = ResourceManager.get_memory_rss()
      self.init_mem_avail = ResourceManager.get_available_virtual_mem()
      self.verbose = verbose
  
      self._cur_period = 1
  
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 1 to create a new MemoryCheckCallback object  with example: obj = MemoryCheckCallback(period, verbose)