class_docstr: A dictionary whose __getitem__ method accesses nested dicts.
  
  This class directly subclasses dict for performance, so there are a number
  of gotchas: 1) the only safe accessor for nested elements is
  `__getitem__` (all other accessors will fail to perform nested lookups), 2)
  nested mappings will not exhibit the same behavior (they will be raw
  dictionaries unless explicitly created to be of this class), and 3) to
  construct this class you _must_ use `from_zip` to get appropriate treatment
  of tuple keys.
class_docstr_tok: ["A","dictionary","whose","__getitem__","method","accesses","nested","dicts",".","This","class","directly","subclasses","dict","for","performance",",","so","there","are","a","number","of","gotchas",":","1",")","the","only","safe","accessor","for","nested","elements","is","`","__getitem__","`","(","all","other","accessors","will","fail","to","perform","nested","lookups",")",",","2",")","nested","mappings","will","not","exhibit","the","same","behavior","(","they","will","be","raw","dictionaries","unless","explicitly","created","to","be","of","this","class",")",",","and","3",")","to","construct","this","class","you","_must_","use","`","from_zip","`","to","get","appropriate","treatment","of","tuple","keys","."]
docstr: Recursively apply dict.__getitem__ for nested elements.
docstr_tok: ["Recursively","apply","dict.__getitem__","for","nested","elements","."]
code: def __getitem__(self, key):
      """Recursively apply dict.__getitem__ for nested elements."""
      # As described in the pandas docs
      # https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#advanced-indexing-with-hierarchical-index  # noqa: E501
      # accessing nested elements of a multiindex must be done using a tuple.
      # Lists and other sequences are treated as accessing multiple elements
      # at the top level of the index.
      if isinstance(key, tuple):
          return reduce(dict.__getitem__, key, self)
      return super().__getitem__(key)
  
imports: from __future__ import annotations
  import itertools
  import warnings
  from collections import abc
  from functools import cached_property, reduce
  from typing import TYPE_CHECKING, Any, Callable, Dict, Mapping, Optional, Tuple, Union
  import numpy
  import pandas
  from packaging.version import Version
  from pandas.api.types import is_bool
  from typing_extensions import Self
  import cudf
  from cudf.core import column
label_desc: Use image node_id 2 for calling the _NestedGetItemDict obj's underlying member method code with example usage: obj.__getitem__(key) and returns: super, reduce