class_docstr: Indexer for BaseDistribution, for pandas-like index in loc and iloc property.
docstr: Getitem dunder, for use in my_distr.loc[index] an my_distr.iloc[index].
docstr_tok: ["Getitem","dunder",",","for","use","in","my_distr.loc","[","index","]","an","my_distr.iloc","[","index","]","."]
code: def __getitem__(self, key):
      """Getitem dunder, for use in my_distr.loc[index] an my_distr.iloc[index]."""
  
      def is_noneslice(obj):
          res = isinstance(obj, slice)
          res = (
              res
              and obj.start is None
              and obj.stop is None
              and obj.step is None
          )
          return res
  
      ref = self.ref
      indexer = getattr(ref, self.method)
  
      if isinstance(key, tuple):
          if not len(key) == 2:
              raise ValueError(
                  "there should be one or two keys when calling .loc, "
                  "e.g., mydist[key], or mydist[key1, key2]"
              )
          rows = key[0]
          cols = key[1]
          if is_noneslice(rows) and is_noneslice(cols):
              return ref
          elif is_noneslice(cols):
              return indexer(rowidx=rows, colidx=None)
          elif is_noneslice(rows):
              return indexer(rowidx=None, colidx=cols)
          else:
              return indexer(rowidx=rows, colidx=cols)
      else:
          return indexer(rowidx=key, colidx=None)
  
imports: from warnings import warn
  import numpy
  import pandas
  from sktime.base import BaseObject
  from sktime.utils.pandas import df_map
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 2 for calling the _Indexer obj's underlying member method code with example usage: obj.__getitem__(key) and returns: res, indexer, ref, indexer, indexer, indexer