def METHOD_NAME(field_class):
    """
    Given a form field class, return a subclass capable of accepting multiple values. This allows us to OR on multiple
    filter values while maintaining the field's built-in validation. Example: GET /api/dcim/devices/?name=foo&name=bar
    """
    class NewField(field_class):
        widget = forms.SelectMultiple
        def to_python(self, value):
            if not value:
                return []
            field = field_class()
            return [
                # Only append non-empty values (this avoids e.g. trying to cast '' as an integer)
                field.to_python(v) for v in value if v
            ]
        def run_validators(self, value):
            for v in value:
                super().run_validators(v)
        def validate(self, value):
            for v in value:
                super().validate(v)
    return type(f'MultiValue{field_class.__name__}', (NewField,), dict())