docstr: Creates a dataset on the Lightly Platform.
  
  The dataset_id of the created dataset is stored in the client.dataset_id
  attribute and all further requests with the client will use the created dataset
  by default.
  
  Args:
      dataset_name:
          The name of the dataset to be created.
      dataset_type:
          The type of the dataset. We recommend to use the API provided constants
          `DatasetType.IMAGES` and `DatasetType.VIDEOS`.
  
  Raises:
      ValueError: If a dataset with dataset_name already exists.
  
  Examples:
      >>> from lightly.api import ApiWorkflowClient
      >>> from lightly.openapi_generated.swagger_client.models import DatasetType
      >>>
      >>> client = ApiWorkflowClient(token="YOUR_TOKEN")
      >>> client.create_dataset('your-dataset-name', dataset_type=DatasetType.IMAGES)
      >>>
      >>> # or to work with videos
      >>> client.create_dataset('your-dataset-name', dataset_type=DatasetType.VIDEOS)
      >>>
      >>> # retrieving dataset_id of the created dataset
      >>> dataset_id = client.dataset_id
      >>>
      >>> # future client requests use the created dataset by default
      >>> client.dataset_type
      'Videos'
docstr_tok: ["Creates","a","dataset","on","the","Lightly","Platform",".","The","dataset_id","of","the","created","dataset","is","stored","in","the","client.dataset_id","attribute","and","all","further","requests","with","the","client","will","use","the","created","dataset","by","default",".","Args",":","dataset_name",":","The","name","of","the","dataset","to","be","created",".","dataset_type",":","The","type","of","the","dataset",".","We","recommend","to","use","the","API","provided","constants","`","DatasetType.IMAGES","`","and","`","DatasetType.VIDEOS","`",".","Raises",":","ValueError",":","If","a","dataset","with","dataset_name","already","exists",".","Examples",":",">",">",">","from","lightly.api","import","ApiWorkflowClient",">",">",">","from","lightly.openapi_generated.swagger_client.models","import","DatasetType",">",">",">",">",">",">","client","=","ApiWorkflowClient","(","token=","''","YOUR_TOKEN","''",")",">",">",">","client.create_dataset","(","'your-dataset-name","'",",","dataset_type=DatasetType.IMAGES",")",">",">",">",">",">",">","#","or","to","work","with","videos",">",">",">","client.create_dataset","(","'your-dataset-name","'",",","dataset_type=DatasetType.VIDEOS",")",">",">",">",">",">",">","#","retrieving","dataset_id","of","the","created","dataset",">",">",">","dataset_id","=","client.dataset_id",">",">",">",">",">",">","#","future","client","requests","use","the","created","dataset","by","default",">",">",">","client.dataset_type","'Videos","'"]
code: def create_dataset(
      self,
      dataset_name: str,
      dataset_type: str = DatasetType.IMAGES,
  ) -> None:
      """Creates a dataset on the Lightly Platform.
  
      The dataset_id of the created dataset is stored in the client.dataset_id
      attribute and all further requests with the client will use the created dataset
      by default.
  
      Args:
          dataset_name:
              The name of the dataset to be created.
          dataset_type:
              The type of the dataset. We recommend to use the API provided constants
              `DatasetType.IMAGES` and `DatasetType.VIDEOS`.
  
      Raises:
          ValueError: If a dataset with dataset_name already exists.
  
      Examples:
          >>> from lightly.api import ApiWorkflowClient
          >>> from lightly.openapi_generated.swagger_client.models import DatasetType
          >>>
          >>> client = ApiWorkflowClient(token="YOUR_TOKEN")
          >>> client.create_dataset('your-dataset-name', dataset_type=DatasetType.IMAGES)
          >>>
          >>> # or to work with videos
          >>> client.create_dataset('your-dataset-name', dataset_type=DatasetType.VIDEOS)
          >>>
          >>> # retrieving dataset_id of the created dataset
          >>> dataset_id = client.dataset_id
          >>>
          >>> # future client requests use the created dataset by default
          >>> client.dataset_type
          'Videos'
      """
  
      if self.dataset_name_exists(dataset_name=dataset_name):
          raise ValueError(
              f"A dataset with the name '{dataset_name}' already exists! Please use "
              f"the `set_dataset_id_by_name()` method instead if you intend to reuse "
              f"an existing dataset."
          )
      self._create_dataset_without_check_existing(
          dataset_name=dataset_name,
          dataset_type=dataset_type,
      )
  
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 11 for calling the _DatasetsMixin obj's underlying member method code with example usage: obj.create_dataset(dataset_name, dataset_type) without return types