docstr: Checks if a dataset exists.
  
  Args:
      dataset_id: Dataset ID.
  
  Returns:
      True if the dataset exists and False otherwise.
  
  Examples:
      >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
      >>> client.create_dataset("your-dataset-name", dataset_type=DatasetType.IMAGES)
      >>> dataset_id = client.dataset_id
      >>> client.dataset_exists(dataset_id=dataset_id)
      True
docstr_tok: ["Checks","if","a","dataset","exists",".","Args",":","dataset_id",":","Dataset","ID",".","Returns",":","True","if","the","dataset","exists","and","False","otherwise",".","Examples",":",">",">",">","client","=","ApiWorkflowClient","(","token=","''","MY_AWESOME_TOKEN","''",")",">",">",">","client.create_dataset","(","``","your-dataset-name","''",",","dataset_type=DatasetType.IMAGES",")",">",">",">","dataset_id","=","client.dataset_id",">",">",">","client.dataset_exists","(","dataset_id=dataset_id",")","True"]
code: def dataset_exists(self, dataset_id: str) -> bool:
      """Checks if a dataset exists.
  
      Args:
          dataset_id: Dataset ID.
  
      Returns:
          True if the dataset exists and False otherwise.
  
      Examples:
          >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
          >>> client.create_dataset("your-dataset-name", dataset_type=DatasetType.IMAGES)
          >>> dataset_id = client.dataset_id
          >>> client.dataset_exists(dataset_id=dataset_id)
          True
      """
      try:
          self.get_dataset_by_id(dataset_id)
          return True
      except ApiException as exception:
          if exception.status == 404:  # Not Found
              return False
          raise exception
  
imports: import warnings
  from itertools import chain
  from typing import Iterator, List, Optional, Set
  from lightly.api import utils
  from lightly.openapi_generated.swagger_client.models import CreateEntityResponse, DatasetCreateRequest, DatasetData, DatasetType
  from lightly.openapi_generated.swagger_client.rest import ApiException
label_desc: Use image node_id 3 for calling the _DatasetsMixin obj's underlying member method code with example usage: obj.dataset_exists(dataset_id) and returns: True, False