<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def restore_type(self, type):
 """Restore type from BigQuery """


        # Mapping
        mapping = {
            'BOOLEAN': 'boolean',
            'DATE': 'date',
            'DATETIME': 'datetime',
            'INTEGER': 'integer',
            'FLOAT': 'number',
            'STRING': 'string',
            'TIME': 'time',
        }

        # Not supported type
        if type not in mapping:
            message = 'Type %s is not supported' % type
            raise tableschema.exceptions.StorageError(message)

        return mapping[type]