class_docstr: `Indexer` will behave like the `LocIndexer` in Pandas
  
  Read-only operations has higher priorities than others.
  So this class is designed in a read-only way to shared data for queries.
  Modifications will results in new Index.
class_docstr_tok: ["`","Indexer","`","will","behave","like","the","`","LocIndexer","`","in","Pandas","Read-only","operations","has","higher","priorities","than","others",".","So","this","class","is","designed","in","a","read-only","way","to","shared","data","for","queries",".","Modifications","will","results","in","new","Index","."]
docstr: Parameters
  ----------
  indexing :
      query for data
  
  Raises
  ------
  KeyError:
      If the non-slice index is queried but does not exist, `KeyError` is raised.
docstr_tok: ["Parameters","--","--","--","--","--","indexing",":","query","for","data","Raises","--","--","--","KeyError",":","If","the","non-slice","index","is","queried","but","does","not","exist",",","`","KeyError","`","is","raised","."]
code: def __getitem__(self, indexing):
      """
  
      Parameters
      ----------
      indexing :
          query for data
  
      Raises
      ------
      KeyError:
          If the non-slice index is queried but does not exist, `KeyError` is raised.
      """
      # 1) convert slices to int loc
      if not isinstance(indexing, tuple):
          # NOTE: tuple is not supported for indexing
          indexing = (indexing,)
  
      # TODO: create a subclass for single value query
      assert len(indexing) <= len(self._indices)
  
      int_indexing = []
      for dim, index in enumerate(self._indices):
          if dim < len(indexing):
              _indexing = indexing[dim]
              if (
                  not self._int_loc
              ):  # type converting is only necessary when it is not `iloc`
                  if isinstance(_indexing, slice):
                      _indexing = self._slc_convert(index, _indexing)
                  elif isinstance(_indexing, (IndexData, np.ndarray)):
                      if isinstance(_indexing, IndexData):
                          _indexing = _indexing.data
                      assert _indexing.ndim == 1
                      if _indexing.dtype != bool:
                          _indexing = np.array(
                              list(index.index(i) for i in _indexing)
                          )
                  else:
                      _indexing = index.index(_indexing)
          else:
              # Default to select all when user input is not given
              _indexing = slice(None)
          int_indexing.append(_indexing)
  
      # 2) select data and index
      new_data = self._bind_id.data[tuple(int_indexing)]
      # return directly if it is scalar
      if new_data.ndim == 0:
          return new_data
      # otherwise we go on to the index part
      new_indices = [
          idx[indexing]
          for idx, indexing in zip(self._indices, int_indexing)
      ]
  
      # 3) squash dimensions
      new_indices = [
          idx
          for idx in new_indices
          if isinstance(idx, np.ndarray) and idx.ndim > 0
      ]  # squash the zero dim indexing
  
      if new_data.ndim == 1:
          cls = SingleData
      elif new_data.ndim == 2:
          cls = MultiData
      else:
          raise ValueError("Not supported")
      return cls(new_data, *new_indices)
  
imports: from __future__ import annotations
  from typing import Dict, Tuple, Union, Callable, List
  import bisect
  import numpy
  import pandas
label_desc: Use image node_id 4 for calling the LocIndexer obj's underlying member method code with example usage: obj.__getitem__(indexing) and returns: cls, new_data