code: def _cleanup(self, pattern: str) -> Path:
      *paths_to_remove, max_path = sorted(self.base_dir.glob(pattern))
      logger.debug(f"found {len(paths_to_remove)} check-ins:")
      logger.debug(f"the acting one: {max_path}")
  
      for path in paths_to_remove:
          logger.debug(f"check-in {path} is being removed")
          try:
              # Ignore errors, as the file may have been removed already.
              path.unlink()
          except OSError:
              pass
          logger.debug(f"check-in {path} removed")
  
      return max_path
  
file_path: aim/aim/sdk/reporter/file_manager.py
imports: from pathlib import Path
  from typing import Union, Optional
  from abc import abstractmethod
  import logging
label_desc: Use image node_id 5 for calling the LocalFileManager obj's underlying member method code with example usage: obj._cleanup(pattern) and returns: max_path