Added as_slice parameter to view_contexts.