code: def __getitem__(self, key: Union[int, str, UID]) -> Dataset:
      if isinstance(key, int):
          return self._datasets[key]
      else:
          for dataset in self._datasets:
              if isinstance(key, UID):
                  if dataset.id == key:
                      return dataset
              elif isinstance(key, str):
                  if dataset.name == key:
                      return dataset
                  elif str(dataset.id) == key:
                      return dataset
      raise KeyError
  
file_path: PySyft/packages/syft/src/syft/client/search.py
imports: from typing import List
  from typing import Tuple
  from typing import Union
  from ..service.dataset.dataset import Dataset
  from ..service.metadata.node_metadata import NodeMetadataJSON
  from ..service.network.network_service import NodePeer
  from ..types.uid import UID
  from .client import SyftClient
  from .registry import DomainRegistry
label_desc: Use image node_id 2 for calling the SearchResults obj's underlying member method code with example usage: obj.__getitem__(key) and returns: self, dataset, dataset, dataset