def limited_by_marker(items, request, max_limit=FLAGS.osapi_max_limit):
    params = get_pagination_params(request)

    limit = params.get('limit', max_limit)
    marker = params.get('marker')

    limit = min(max_limit, limit)
    start_index = 0
    if marker:
        start_index = -1
        for i, item in enumerate(items):
            if item['id'] == marker:
                start_index = i + 1
                break
        if start_index < 0:
            msg = _('marker [%s] not found') % marker
            raise webob.exc.HTTPBadRequest(explanation=msg)
    range_end = start_index + limit
    return items[start_index:range_end]
.. todo::
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/common.py/limited_by_marker--crossover with--dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/sandbox/cuda_convnet/stochastic_pool.py/StochasticMaxPool.c_header_dirs