<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _download_if_necessary(self, url, download_if_missing, overwrite):
 """ Return local cached path to a remote file, download it if necessary. """

        cached_path = self.cached_path(url)
        missing = not exists(cached_path)
        if (missing or overwrite) and download_if_missing:
            logger.info("Fetching %s from URL %s", cached_path, url)
            datacache.download._download_and_decompress_if_necessary(
                full_path=cached_path,
                download_url=url,
                timeout=3600)
        elif missing:
            raise MissingRemoteFile(url)
        return cached_path