def to_python(self, value):
        """
        Validates that the input can be converted to a time. Returns a Python
        datetime.time object.
        """
        if value in validators.EMPTY_VALUES:
            return None
        if isinstance(value, datetime.time):
            return value
        for format in self.input_formats or formats.get_format('TIME_INPUT_FORMATS'):
            try:
                return datetime.time(*time.strptime(value, format)[3:6])
            except __HOLE__:
                continue
        raise ValidationError(self.error_messages['invalid'])
dataset/ETHPy150Open adieu/django-nonrel/django/forms/fields.py/TimeField.to_python