def METHOD_NAME(self, path, *args, **kwargs):
    assert self._parsed_url_during_load is None
    need_sync = False
    logger = logging.getLogger(__name__)
    logger.info("[DetectionCheckpointer] Loading from {} ...".format(path))
    if path and isinstance(self.model, DistributedDataParallel):
        path = self.path_manager.get_local_path(path)
        has_file = os.path.isfile(path)
        all_has_file = comm.all_gather(has_file)
        if not all_has_file[0]:
            raise OSError(f"File {path} not found on main worker.")
        if not all(all_has_file):
            logger.warning(
                f"Not all workers can read checkpoint {path}. "
                "Training may fail to fully resume."
            )
            # TODO: broadcast the checkpoint file contents from main
            # worker, and load from it instead.
            need_sync = True
        if not has_file:
            path = None  # don't load if not readable
    if path:
        parsed_url = urlparse(path)
        self._parsed_url_during_load = parsed_url
        path = parsed_url._replace(query="").geturl()  # remove query from filename
        path = self.path_manager.get_local_path(path)
    ret = super().METHOD_NAME(path, *args, **kwargs)
    if need_sync:
        logger.info("Broadcasting model states from main worker ...")
        self.model._sync_params_and_buffers()
    self._parsed_url_during_load = None  # reset to None
    return ret