def to_python(self, value, parent=None):
        """
        Validates that the input can be converted to a date. Returns a Python
        datetime.date object.
        """
        if value is None:
            return None
        if isinstance(value, datetime.datetime):
            return value
        if isinstance(value, datetime.date):
            return value
        for format in self.input_formats or formats.get_format('DATE_INPUT_FORMATS'):
            try:
                return datetime.datetime.strptime(value, format)
            except __HOLE__:
                continue
        return datetime.datetime.strptime(value)
dataset/ETHPy150Open zbyte64/django-dockit/dockit/schema/fields.py/DateTimeField.to_python