code: def __getitem__(self, key: str) -> Union[dict, Path]:
      if key not in self._keys:
          raise KeyError(key)
  
      item = getattr(self, key)
      if isinstance(item, Struct):
          item = item._asdict()
      return item
  
file_path: DeepPavlov/deeppavlov/configs/__init__.py
imports: from pathlib import Path
  from typing import Iterator, Dict, Union, Iterable
label_desc: Use image node_id 5 for calling the Struct obj's underlying member method code with example usage: obj.__getitem__(key) and returns: item