def METHOD_NAME(name, field, type=None):
    """Create a geo bounding box filter.
    :param field: Field name.
    :param type: Method to use (``memory`` or ``indexed``).
    :returns: Function that returns the Geo bounding box query.
    """
    def inner(values):
        if len(values) != 1:
            raise RESTValidationError(
                errors=[FieldError(name, 'Only one parameter is allowed.')])
        values = [value.strip() for value in values[0].split(',')]
        if len(values) != 4:
            raise RESTValidationError(
                errors=[FieldError(
                    name,
                    'Invalid bounds: four comma-separated numbers required. '
                    'Example: 143.37158,-38.99357,146.90918,-37.35269')])
        try:
            bottom_left_lon = Decimal(values[0])
            bottom_left_lat = Decimal(values[1])
            top_right_lon = Decimal(values[2])
            top_right_lat = Decimal(values[3])
        except InvalidOperation:
            raise RESTValidationError(
                errors=[FieldError(name, 'Invalid number in bounds.')])
        try:
            if not (-90 <= bottom_left_lat <= 90) or \
                    not (-90 <= top_right_lat <= 90):
                raise RESTValidationError(
                    errors=[FieldError(
                        name, 'Latitude must be between -90 and 90.')])
            if not (-180 <= bottom_left_lon <= 180) or \
                    not (-180 <= top_right_lon <= 180):
                raise RESTValidationError(
                    errors=[FieldError(
                        name, 'Longitude must be between -180 and 180.')])
            if top_right_lat <= bottom_left_lat:
                raise RESTValidationError(
                    errors=[FieldError(
                        name, 'Top-right latitude must be greater than '
                              'bottom-left latitude.')])
        except InvalidOperation:  # comparison with "NaN" raises exception
            raise RESTValidationError(
                errors=[FieldError(
                    name, 'Invalid number: "NaN" is not a permitted value.')])
        query = {
            field: {
                'top_right': {
                    'lat': top_right_lat,
                    'lon': top_right_lon,
                },
                'bottom_left': {
                    'lat': bottom_left_lat,
                    'lon': bottom_left_lon,
                }
            }
        }
        if type:
            query['type'] = type
        return Q('geo_bounding_box', **query)
    return inner