code: def table_exists(client, table_reference):
      
      from google.cloud.exceptions import NotFound
  
      try:
          client.get_table(table_reference)
          return True
      except NotFound:
          return False
docs: Return if a table exists.
  
      Args:
          client (google.cloud.bigquery.client.Client):
              A client to connect to the BigQuery API.
          table_reference (google.cloud.bigquery.table.TableReference):
              A reference to the table to look for.
  
      Returns:
          bool: ``True`` if the table exists, ``False`` otherwise.