def METHOD_NAME(box):
    query = self._box_query(box, drop=['char_order', 'dim'])
    # Have to remove small N if there are restrictions on the character order
    if 'omin' in box:
        if box['omin'] == 2:
            if 'level' not in query:
                query['level'] = {}
            if '$gte' not in query['level'] or query['level']['$gte'] < 3:
                query['level']['$gte'] = 3
        else:
            raise NotImplementedError
    if 'Dmin' in box:
        query['newspace_dims']['$maxgte'] = box['Dmin']
    if 'Dmax' in box:
        query['newspace_dims']['$anylte'] = box['Dmax']
    return query