p_slice_sample function

Slice operations