code: def test_dataset_get_by_name(
      root_verify_key, mock_dataset_stash, mock_dataset
  ) -> None:
      # retrieving existing dataset
      result = mock_dataset_stash.get_by_name(
          root_verify_key, mock_dataset.name
      )
      assert (
          result.is_ok()
      ), f"Dataset could not be retrieved, result: {result}"
      assert isinstance(result.ok(), Dataset)
      assert result.ok().id == mock_dataset.id
  
      # retrieving non-existing dataset
      result = mock_dataset_stash.get_by_name(
          root_verify_key, "non_existing_dataset"
      )
      assert (
          result.is_ok()
      ), f"Dataset could not be retrieved, result: {result}"
      assert result.ok() is None
  
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 3 for calling a global function with example usage: test_dataset_get_by_name(root_verify_key, mock_dataset_stash, mock_dataset) without return types