code: def create_dataset(self, dataset, exists_ok=False, retry=DEFAULT_RETRY):
          
          if isinstance(dataset, str):
              dataset = DatasetReference.from_string(
                  dataset, default_project=self.project
              )
          if isinstance(dataset, DatasetReference):
              dataset = Dataset(dataset)
  
          path = "/projects/%s/datasets" % (dataset.project,)
  
          data = dataset.to_api_repr()
          if data.get("location") is None and self.location is not None:
              data["location"] = self.location
  
          try:
              api_response = self._call_api(retry, method="POST", path=path, data=data)
              return Dataset.from_api_repr(api_response)
          except google.api_core.exceptions.Conflict:
              if not exists_ok:
                  raise
              return self.get_dataset(dataset.reference, retry=retry)
docs: API call: create the dataset via a POST request.
  
          See
          https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/insert
  
          Args:
              dataset (Union[ \
                  :class:`~google.cloud.bigquery.dataset.Dataset`, \
                  :class:`~google.cloud.bigquery.dataset.DatasetReference`, \
                  str, \
              ]):
                  A :class:`~google.cloud.bigquery.dataset.Dataset` to create.
                  If ``dataset`` is a reference, an empty dataset is created
                  with the specified ID and client's default location.
              exists_ok (bool):
                  Defaults to ``False``. If ``True``, ignore "already exists"
                  errors when creating the dataset.
              retry (google.api_core.retry.Retry):
                  Optional. How to retry the RPC.
  
          Returns:
              google.cloud.bigquery.dataset.Dataset:
                  A new ``Dataset`` returned from the API.
  
          Example:
  
              >>> from google.cloud import bigquery
              >>> client = bigquery.Client()
              >>> dataset = bigquery.Dataset(client.dataset('my_dataset'))
              >>> dataset = client.create_dataset(dataset)