class_docstr: Helper base class for the :class:`Domain` and :class:`Sample` classes.
  
  It implements common logic for creation, representation, type conversion
  and serialisation.
class_docstr_tok: ["Helper","base","class","for","the",":","class",":","`","Domain","`","and",":","class",":","`","Sample","`","classes",".","It","implements","common","logic","for","creation",",","representation",",","type","conversion","and","serialisation","."]
docstr: Return the item (possibly a subdomain) for a given key.
  
  Args:
      item: str of tuple of str. If the latter it will access nested
      structures with the next str in the tuple.
docstr_tok: ["Return","the","item","(","possibly","a","subdomain",")","for","a","given","key",".","Args",":","item",":","str","of","tuple","of","str",".","If","the","latter","it","will","access","nested","structures","with","the","next","str","in","the","tuple","."]
code: def __getitem__(self, item):
      """Return the item (possibly a subdomain) for a given key.
  
      Args:
          item: str of tuple of str. If the latter it will access nested
          structures with the next str in the tuple.
      """
      if isinstance(item, str):
          return self._data.__getitem__(item)
      elif isinstance(item, tuple) and all(
          map(lambda x: isinstance(x, str), item)
      ):
          sub_dict = self._data
          for it in item:
              if not isinstance(sub_dict, dict):
                  raise KeyError(f"Unknown sub-key {it}.")
              sub_dict = sub_dict[it]
          return sub_dict
  
imports: import ast
  import copy
  import os
  import pickle
  import random
  from collections import namedtuple
  from typing import Tuple
label_desc: Use image node_id 7 for calling the _RecursiveDict obj's underlying member method code with example usage: obj.__getitem__(item) and returns: self, sub_dict