code: def download_or_copy_if_necessary(
              self,
              path_or_url,
              download_if_missing=False,
              overwrite=False):
          
          assert path_or_url, "Expected non-empty string for path_or_url"
          if self.is_url_format(path_or_url):
              return self._download_if_necessary(
                  path_or_url,
                  download_if_missing,
                  overwrite)
          else:
              return self._copy_if_necessary(path_or_url, overwrite)
docs: Download a remote file or copy
          Get the local path to a possibly remote file.
  
          Download if file is missing from the cache directory and
          `download_if_missing` is True. Download even if local file exists if
          both `download_if_missing` and `overwrite` are True.
  
          If the file is on the local file system then return its path, unless
          self.copy_local_to_cache is True, and then copy it to the cache first.
  
          Parameters
          ----------
          path_or_url : str
  
          download_if_missing : bool, optional
              Download files if missing from local cache
  
          overwrite : bool, optional
              Overwrite existing copy if it exists