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
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
        
lightly/api/api_workflow_datasets.py