code: def test_dataset_update(
      root_verify_key,
      mock_dataset_stash,
      mock_dataset,
      mock_dataset_update,
  ) -> None:
      # succesful dataset update
      result = mock_dataset_stash.update(
          root_verify_key, dataset_update=mock_dataset_update
      )
      assert (
          result.is_ok()
      ), f"Dataset could not be retrieved, result: {result}"
      assert isinstance(result.ok(), Dataset)
      assert mock_dataset.id == result.ok().id
  
      # error should be raised
      other_obj = object()
      result = mock_dataset_stash.update(
          root_verify_key, dataset_update=other_obj
      )
      assert result.err(), (
          f"Dataset was updated with non-DatasetUpdate object,"
          f"result: {result}"
      )
  
file_path: PySyft/packages/syft/tests/syft/dataset/dataset_stash_test.py
imports: from typing import List
  import pytest
  from syft.service.dataset.dataset import Dataset
  from syft.service.dataset.dataset_stash import ActionIDsPartitionKey
  from syft.service.dataset.dataset_stash import NamePartitionKey
  from syft.store.document_store import QueryKey
  from syft.types.uid import UID
label_desc: Use image node_id 4 for calling a global function with example usage: test_dataset_update(root_verify_key, mock_dataset_stash, mock_dataset, mock_dataset_update) without return types