code: def test_download_partial_dest_exists(
      tmp_path, monkeypatch, attributes, overwrite, expect_attrs
  ):
      """Tests that _download_dataset will fetch only the requested attributes
      of a dataset when the dataset does not exist locally."""
      remote_dataset = Dataset()
      remote_dataset.x = "remote_value"
      remote_dataset.y = 2
      remote_dataset.z = 3
  
      monkeypatch.setattr(
          pennylane.data.data_manager,
          "open_hdf5_s3",
          MagicMock(return_value=remote_dataset.bind),
      )
  
      local_dataset = Dataset.open(tmp_path / "dataset", "w")
      local_dataset.x = "local_value"
      local_dataset.close()
  
      pennylane.data.data_manager._download_partial(
          "dataset/path",
          dest=tmp_path / "dataset",
          attributes=attributes,
          overwrite=overwrite,
          block_size=1,
      )
  
      local = Dataset.open(tmp_path / "dataset")
  
      assert local.attrs == expect_attrs
  
imports: import os
  from pathlib import Path, PosixPath
  from unittest.mock import MagicMock, patch
  import pytest
  import requests
  import pennylane
  import pennylane.data.data_manager
  from pennylane.data import Dataset
  from pennylane.data.data_manager import S3_URL, DataPath, _validate_attributes
label_desc: Use image node_id 16 for calling a global function with example usage: test_download_partial_dest_exists(tmp_path, monkeypatch, attributes, overwrite, expect_attrs) without return types