code: def _handle_download_result(self, resource, tmp_dir_path, sha256, dl_size):
      
      fnames = tf.io.gfile.listdir(tmp_dir_path)
      if len(fnames) > 1:
        raise AssertionError('More than one file in %s.' % tmp_dir_path)
      original_fname = fnames[0]
      tmp_path = os.path.join(tmp_dir_path, original_fname)
      self._recorded_sizes_checksums[resource.url] = (dl_size, sha256)
      if self._register_checksums:
        self._record_sizes_checksums()
      elif (dl_size, sha256) != self._sizes_checksums.get(resource.url, None):
        raise NonMatchingChecksumError(resource.url, tmp_path)
      download_path = self._get_final_dl_path(resource.url, sha256)
      resource_lib.write_info_file(resource, download_path, self._dataset_name,
                                   original_fname)
      # Unconditionally overwrite because either file doesn't exist or
      # FORCE_DOWNLOAD=true
      tf.io.gfile.rename(tmp_path, download_path, overwrite=True)
      tf.io.gfile.rmtree(tmp_dir_path)
      return download_path
docs: Store dled file to definitive place, write INFO file, return path.