Restore row from BigQuery

def restore_row(self, row, schema):
        """Restore row from BigQuery
        """
        for index, field in enumerate(schema.fields):
            if field.type == 'datetime':
                row[index] = parse(row[index])
            if field.type == 'date':
                row[index] = parse(row[index]).date()
            if field.type == 'time':
                row[index] = parse(row[index]).time()
        return schema.cast_row(row)