code: def _array_slice(array, index):
      
      if isinstance(index, slice):
          start = index.start
          stop = index.stop
          if (start is not None and start < 0) or (
              stop is not None and stop < 0
          ):
              raise ValueError('negative slicing not yet supported')
  
          step = index.step
  
          if step is not None and step != 1:
              raise NotImplementedError('step can only be 1')
  
          op = ops.ArraySlice(array, start if start is not None else 0, stop)
      else:
          op = ops.ArrayIndex(array, index)
      return op.to_expr()
docs: Slice or index `array` at `index`.
  
      Parameters
      ----------
      index : int or ibis.expr.types.IntegerValue or slice
  
      Returns
      -------
      sliced_array : ibis.expr.types.ValueExpr
          If `index` is an ``int`` or :class:`~ibis.expr.types.IntegerValue` then
          the return type is the element type of `array`. If `index` is a
          ``slice`` then the return type is the same type as the input.