<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pythonize(self, val):
 """Convert value into a boolean :param val: value to convert :type val: bool, int, str :return: boolean corresponding to value :: {'1': True, 'yes': True, 'true': True, 'on': True, '0': False, 'no': False, 'false': False, 'off': False} :rtype: bool """

        __boolean_states__ = {'1': True, 'yes': True, 'true': True, 'on': True,
                              '0': False, 'no': False, 'false': False, 'off': False}

        if isinstance(val, bool):
            return val
        val = unique_value(val).lower()
        if val in list(__boolean_states__.keys()):
            return __boolean_states__[val]

        raise PythonizeError("Cannot convert '%s' to a boolean value" % val)