def restore_descriptor(self, converted_descriptor):
<EOL>fields = []<EOL>for field in converted_descriptor['<STR_LIT>']:<EOL><INDENT>field_type = self.restore_type(field['<STR_LIT:type>'])<EOL>resfield = {<EOL>'<STR_LIT:name>': field['<STR_LIT:name>'],<EOL>'<STR_LIT:type>': field_type,<EOL>}<EOL>if field.get('<STR_LIT>', '<STR_LIT>') != '<STR_LIT>':<EOL><INDENT>resfield['<STR_LIT>'] = {'<STR_LIT>': True}<EOL><DEDENT>fields.append(resfield)<EOL><DEDENT>descriptor = {'<STR_LIT>': fields}<EOL>return descriptor<EOL>
Restore descriptor rom BigQuery