<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_python(self, value):
 """Validate using cursor for consistency between direct set of values vs modification of cursor values"""

        if not isinstance(value, (list, type(None))):
            raise ValidationError(
                self.record,
                "Field '{}' must be set to a list, not '{}'".format(
                    self.name,
                    value.__class__
                )
            )
        value = value or []
        self.cursor._validate_list(value)
        return super(ListField, self).set_python(value)