code: def _mmcv_save_checkpoint(
      original_fn, model, filename, *args, **kwargs
  ):
      # note that mmcv.runner.save_checkpoint doesn't return anything, hence the need for this
      # patch function, but we return from it just in case this changes in the future
      if not PatchPyTorchModelIO._current_task:
          return original_fn(model, filename, *args, **kwargs)
      tid = threading.current_thread().ident
      PatchPyTorchModelIO._checkpoint_filename[tid] = filename
      ret = original_fn(model, filename, *args, **kwargs)
      del PatchPyTorchModelIO._checkpoint_filename[tid]
      return ret
  
imports: import sys
  import six
  import threading
  from pathlib2 import Path
  from ...binding.frameworks.base_bind import PatchBaseModelIO
  from ..frameworks import _patched_call, _patched_call_no_recursion_guard, WeightsFileHandler, _Empty
  from ..import_bind import PostImportHookPatching
  from ...config import running_remotely
  from ...model import Framework
label_desc: Use image node_id 4 for calling the PatchPyTorchModelIO obj's underlying member method code with example usage: obj._mmcv_save_checkpoint(original_fn, model, filename) and returns: ret, original_fn