def next_marker_by_id(collection, limit, marker):
    """
    Returns the next marker based on the limit-1 item in the collection

    :param collection: an iterable containing the collection to be paginated
    :param limit: the limit on the collection
    :marker: the current marker used to obtain this collection

    :return: the next marker that would be used to fetch the next collection,
        based on the collection item ids
    """
    return collection[limit - 1]['id']