docs: def genslices(n):
      """Generate all possible slices for a single dimension."""
      def range_with_none():
          yield None
          yield from range(-n, n+1)
  
      for t in product(range_with_none(), range_with_none(), range_with_none()):
          s = slice(*t)
          if s.step != 0:
              yield s