def limited(items, request, max_limit=None):
 max_limit = (max_limit or CONF.osapi_max_limit)
 (marker, limit, offset) = get_pagination_params(request.GET.copy(), max_limit)
 range_end = (offset + (limit or max_limit))
 return items[offset:range_end]

def limited ( items , request , max_limit = None ) : max_limit = ( max_limit or CONF . osapi_max_limit ) ( marker , limit , offset ) = get_pagination_params ( request . GET . copy ( ) , max_limit ) range_end = ( offset + ( limit or max_limit ) ) return items [ offset : range_end ]
return a slice of items according to requested offset and limit .