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