code: def get_value(self, series, key):
          
          if np.asarray(key).dtype == np.dtype(bool):
              return series.iloc[key]
          elif isinstance(key, slice):
              return series.iloc[self.slice_indexer(
                  key.start, key.stop, key.step)]
          else:
              return series.iloc[self.get_loc(key)]
docs: Adapted from pandas.tseries.index.DatetimeIndex.get_value