code: def test_dataset_search_action_ids(
      root_verify_key, mock_dataset_stash, mock_dataset
  ):
      action_id = mock_dataset.assets[0].action_id
  
      result = mock_dataset_stash.search_action_ids(
          root_verify_key, uid=action_id
      )
      assert (
          result.is_ok()
      ), f"Dataset could not be retrieved, result: {result}"
      assert (
          result.ok() != []
      ), f"Dataset was not found by action_id {action_id}"
      assert isinstance(result.ok()[0], Dataset)
      assert result.ok()[0].id == mock_dataset.id
  
      # retrieving dataset by list of action_ids
      result = mock_dataset_stash.search_action_ids(
          root_verify_key, uid=[action_id]
      )
      assert (
          result.is_ok()
      ), f"Dataset could not be retrieved, result: {result}"
      assert isinstance(result.ok()[0], Dataset)
      assert result.ok()[0].id == mock_dataset.id
  
      # retrieving dataset by non-existing action_id
      other_action_id = UID()
      result = mock_dataset_stash.search_action_ids(
          root_verify_key, uid=other_action_id
      )
      assert (
          result.is_ok()
      ), f"Dataset could not be retrieved, result: {result}"
      assert result.ok() == []
      # inconsitent behaviour, line 62 return None, this returns []
  
      # passing random object
      random_obj = object()
      with pytest.raises(AttributeError):
          result = mock_dataset_stash.search_action_ids(
              root_verify_key, uid=random_obj
          )
  
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 5 for calling a global function with example usage: test_dataset_search_action_ids(root_verify_key, mock_dataset_stash, mock_dataset) without return types