<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def schema(self, dataset_id, table_id):
 """Retrieve the schema of the table Obtain from BigQuery the field names and field types for the table defined by the parameters Parameters dataset_id : str Name of the BigQuery dataset for the table table_id : str Name of the BigQuery table Returns ------- list of dicts Fields representing the schema """

        table_ref = self.client.dataset(dataset_id).table(table_id)

        try:
            table = self.client.get_table(table_ref)
            remote_schema = table.schema

            remote_fields = [
                field_remote.to_api_repr() for field_remote in remote_schema
            ]
            for field in remote_fields:
                field["type"] = field["type"].upper()
                field["mode"] = field["mode"].upper()

            return remote_fields
        except self.http_error as ex:
            self.process_http_error(ex)