<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def patch_table(self, dataset, table, schema, project_id=None):
 """Patch an existing table in the dataset. Parameters dataset : str The dataset to patch the table in table : str The name of the table to patch schema : dict The table schema project_id: str, optional The project to patch the table in Returns ------- Union[bool, dict] Bool indicating if the table was successfully patched or not, or response from BigQuery if swallow_results is set to False """

        project_id = self._get_project_id(project_id)

        body = {
            'schema': {'fields': schema},
            'tableReference': {
                'tableId': table,
                'projectId': project_id,
                'datasetId': dataset
            }
        }

        try:
            result = self.bigquery.tables().patch(
                projectId=project_id,
                datasetId=dataset,
                body=body
            ).execute(num_retries=self.num_retries)
            if self.swallow_results:
                return True
            else:
                return result

        except HttpError as e:
            logger.error(('Cannot patch table {0}.{1}.{2}\n'
                          'Http Error: {3}').format(project_id, dataset, table, e.content))
            if self.swallow_results:
                return False
            else:
                return {}