code: def recursive_getitem(d: Mapping[str, Any], keys: Union[str, Sequence[str]]) -> Any:
      
      # If only a string, then just just return the item
      if isinstance(keys, str):
          return d[keys]
      else:
          return functools.reduce(operator.getitem, keys, d)
docs: Recursively retrieve an item from a nested dict.
  
      Credit to: https://stackoverflow.com/a/52260663
  
      Args:
          d: Mapping of strings to objects.
          keys: Names of the keys under which the object is stored. Can also just be a single string.
      Returns:
          The object stored under the keys.
      Raises:
          KeyError: If one of the keys isnt' found.