class_docstr: Class that inherits callbacks.ModelCheckpoint. The purpose is to resolve the potential issues in lightning.
  
  - Issue1:
  
  It solves the issue described in https://github.com/Lightning-AI/lightning/issues/5582.
  For ddp_spawn, the checkpoint_callback.best_k_models will be empty.
  Here, we resolve it by storing the best_models to "SAVE_DIR/best_k_models.yaml".
code: def _update_best_and_save(
      self,
      current: torch.Tensor,
      trainer: "pl.Trainer",
      monitor_candidates: Dict[str, torch.Tensor],
  ) -> None:
      super(AutoMMModelCheckpoint, self)._update_best_and_save(
          current=current,
          trainer=trainer,
          monitor_candidates=monitor_candidates,
      )
      self.to_yaml()
  
imports: import logging
  import os
  import re
  import shutil
  from typing import Any, Dict, List, Optional, Tuple, Union
  import lightning.pytorch
  import torch
  from lightning.pytorch.strategies import DeepSpeedStrategy
  from lightning.pytorch.utilities.rank_zero import rank_zero_warn
  from .cloud_io import _atomic_save
  from .cloud_io import _load
  from .cloud_io import get_filesystem
label_desc: Use image node_id 2 for calling the AutoMMModelCheckpoint obj's underlying member method code with example usage: obj._update_best_and_save(current, trainer, monitor_candidates) without return types