code: def test_dataset_namepartitionkey() -> None:
      mock_obj = "dummy_name_key"
  
      assert NamePartitionKey.key == "name"
      assert NamePartitionKey.type_ == str
  
      name_partition_key = NamePartitionKey.with_obj(obj=mock_obj)
  
      assert isinstance(name_partition_key, QueryKey)
      assert name_partition_key.key == "name"
      assert name_partition_key.type_ == str
      assert name_partition_key.value == mock_obj
  
      with pytest.raises(AttributeError):
          NamePartitionKey.with_obj(obj=[UID()])
  
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 1 for calling a global function with example usage: test_dataset_namepartitionkey() without return types