def _load_model(
        filename: str | None = None,
        url: str | None = None,
        is_training: bool = False,
    ) -> tuple[dict[str, "tf.Tensor"], ...]:
        """
        Download, extract and load a model from a URL if it is not already in the cache. The file indicated by `url`
        is downloaded to the path ~/.art/data and given the name `filename`. Files in tar, tar.gz, tar.bz, and zip
        formats will also be extracted. Then the model is loaded, pipelined and its outputs are returned as a tuple
        of (predictions, losses, detections).

        :param filename: Name of the file.
        :param url: Download URL.
        :param is_training: A boolean indicating whether the training version of the computation graph should be
                            constructed.
        :return: the object detection model restored from checkpoint
        """
        import tensorflow as tf

        from object_detection.utils import config_util
        from object_detection.builders import model_builder

        # If obj_detection_model is None, then we need to have parameters filename and url to download, extract
        # and load the object detection model
        if filename is None or url is None:  # pragma: no cover
            raise ValueError(
                "Need input parameters `filename` and `url` to download, "
                "extract and load the object detection model."
            )

        # Download and extract
        path = get_file(filename=filename, path=config.ART_DATA_PATH, url=url, extract=True)
        # Load model config
        pipeline_config = path + "/pipeline.config"
        configs = config_util.get_configs_from_pipeline_file(pipeline_config)
        configs["model"].faster_rcnn.second_stage_batch_size = configs["model"].faster_rcnn.first_stage_max_proposals

        # Load model
        obj_detection_model = model_builder.build(
            model_config=configs["model"], is_training=is_training, add_summaries=False
        )

        # Restore checkpoint
        ckpt = tf.compat.v2.train.Checkpoint(model=obj_detection_model)
        ckpt.restore(path + "/checkpoint/ckpt-0").expect_partial()

        return obj_detection_model

        Download, extract and load a model from a URL if it is not already in the cache. The file indicated by `url`
        is downloaded to the path ~/.art/data and given the name `filename`. Files in tar, tar.gz, tar.bz, and zip
        formats will also be extracted. Then the model is loaded, pipelined and its outputs are returned as a tuple
        of (predictions, losses, detections).

        :param filename: Name of the file.
        :param url: Download URL.
        :param is_training: A boolean indicating whether the training version of the computation graph should be
                            constructed.
        :return: the object detection model restored from checkpoint
        
art/estimators/object_detection/tensorflow_v2_faster_rcnn.py