def sort(oids, reverse=False, limit=None):
    """ Return the intersection of the oids of the folder's order with the
        oids passed in.  If ``reverse`` is True, reverse the result set.  If
        ``limit`` is an integer, return only that number of items (after
        reversing, if reverse is True)."""
