code: def _patch_model_io():
      if PatchXGBoostModelIO.__patched:
          return
  
      if "xgboost" not in sys.modules:
          return
      PatchXGBoostModelIO.__patched = True
      # noinspection PyBroadException
      try:
          import xgboost as xgb  # noqa
  
          bst = xgb.Booster
          bst.save_model = _patched_call(
              bst.save_model, PatchXGBoostModelIO._save
          )
          bst.load_model = _patched_call(
              bst.load_model, PatchXGBoostModelIO._load
          )
          # noinspection PyBroadException
          try:
              from xgboost.callback import TrainingCallback  # noqa
  
              PatchXGBoostModelIO.__callback_cls = (
                  PatchXGBoostModelIO._generate_training_callback_class()
              )
              xgb.train = _patched_call(
                  xgb.train, PatchXGBoostModelIO._train
              )
              xgb.training.train = _patched_call(
                  xgb.training.train, PatchXGBoostModelIO._train
              )
              xgb.sklearn.train = _patched_call(
                  xgb.sklearn.train, PatchXGBoostModelIO._train
              )
          except ImportError:
              pass
          except Exception:
              pass
  
      except ImportError:
          pass
      except Exception:
          pass
  
file_path: clearml/clearml/binding/frameworks/xgboost_bind.py
imports: import sys
  import six
  from pathlib2 import Path
  from ..frameworks.base_bind import PatchBaseModelIO
  from ..frameworks import _patched_call, WeightsFileHandler, _Empty
  from ..import_bind import PostImportHookPatching
  from ...config import running_remotely
  from ...model import Framework
label_desc: Use image node_id 2 for calling the PatchXGBoostModelIO obj's underlying member method code with example usage: obj._patch_model_io() without return types