code: def slice_indexer(self, start=None, end=None, step=None, kind=None):
          start_slice, end_slice = self.slice_locs(start, end, step=step,
                                                   kind=kind)
          if not is_scalar(start_slice):
              raise AssertionError("Start slice bound is non-scalar")
          if not is_scalar(end_slice):
              raise AssertionError("End slice bound is non-scalar")
          return slice(start_slice, end_slice, step)