code: def delete_dataset(
          self, dataset, delete_contents=False, retry=DEFAULT_RETRY, not_found_ok=False
      ):
          
          if isinstance(dataset, str):
              dataset = DatasetReference.from_string(
                  dataset, default_project=self.project
              )
  
          if not isinstance(dataset, (Dataset, DatasetReference)):
              raise TypeError("dataset must be a Dataset or a DatasetReference")
  
          params = {}
          if delete_contents:
              params["deleteContents"] = "true"
  
          try:
              self._call_api(
                  retry, method="DELETE", path=dataset.path, query_params=params
              )
          except google.api_core.exceptions.NotFound:
              if not not_found_ok:
                  raise
docs: Delete a dataset.
  
          See
          https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/delete
  
          Args
              dataset (Union[ \
                  :class:`~google.cloud.bigquery.dataset.Dataset`, \
                  :class:`~google.cloud.bigquery.dataset.DatasetReference`, \
                  str, \
              ]):
                  A reference to the dataset to delete. If a string is passed
                  in, this method attempts to create a dataset reference from a
                  string using
                  :func:`google.cloud.bigquery.dataset.DatasetReference.from_string`.
              delete_contents (boolean):
                  (Optional) If True, delete all the tables in the dataset. If
                  False and the dataset contains tables, the request will fail.
                  Default is False.
              retry (:class:`google.api_core.retry.Retry`):
                  (Optional) How to retry the RPC.
              not_found_ok (bool):
                  Defaults to ``False``. If ``True``, ignore "not found" errors
                  when deleting the dataset.