def _cast(self, value):
        # Many status variables are integers or floats but SHOW GLOBAL STATUS
        # returns them as strings
        try:
            value = int(value)
        except ValueError:
            try:
                value = float(value)
            except __HOLE__:
                pass

        if value == 'ON':
            return True
        elif value == 'OFF':
            return False

        return value
dataset/ETHPy150Open adamchainz/django-mysql/django_mysql/status.py/BaseStatus._cast