docstr: Returns all datasets owned by the current user.
  
  There can be multiple datasets with the same name accessible to the current
  user. This can happen if either:
  * A dataset has been explicitly shared with the user
  * The user has access to team datasets
  The `shared` flag controls whether these datasets are returned.
  
  Args:
      shared:
          * If False (default), returns only datasets owned by the user. In this
          case at most one dataset will be returned.
          * If True, returns datasets which have been shared with the user,
          including team datasets. Excludes user's own datasets. Can return
          multiple datasets.
          * If None, returns all datasets the users has access to. Can return
          multiple datasets.
  
  Returns:
      A list of datasets owned by the current user.
  
  Examples:
      >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
      >>> client.create_dataset("your-dataset-name", dataset_type=DatasetType.IMAGES)
      >>> client.get_datasets()
      [{'created_at': 1685009504596,
       'datasource_processed_until_timestamp': 1685009513,
       'datasources': ['646f346004d77b4e1424e67e', '646f346004d77b4e1424e695'],
       'id': '646f34608a5613b57d8b73c9',
       'img_type': 'full',
       'type': 'Images',
       ...}]
docstr_tok: ["Returns","all","datasets","owned","by","the","current","user",".","There","can","be","multiple","datasets","with","the","same","name","accessible","to","the","current","user",".","This","can","happen","if","either",":","*","A","dataset","has","been","explicitly","shared","with","the","user","*","The","user","has","access","to","team","datasets","The","`","shared","`","flag","controls","whether","these","datasets","are","returned",".","Args",":","shared",":","*","If","False","(","default",")",",","returns","only","datasets","owned","by","the","user",".","In","this","case","at","most","one","dataset","will","be","returned",".","*","If","True",",","returns","datasets","which","have","been","shared","with","the","user",",","including","team","datasets",".","Excludes","user","'s","own","datasets",".","Can","return","multiple","datasets",".","*","If","None",",","returns","all","datasets","the","users","has","access","to",".","Can","return","multiple","datasets",".","Returns",":","A","list","of","datasets","owned","by","the","current","user",".","Examples",":",">",">",">","client","=","ApiWorkflowClient","(","token=","''","MY_AWESOME_TOKEN","''",")",">",">",">","client.create_dataset","(","``","your-dataset-name","''",",","dataset_type=DatasetType.IMAGES",")",">",">",">","client.get_datasets","(",")","[","{","'created_at","'",":","1685009504596",",","'datasource_processed_until_timestamp","'",":","1685009513",",","'datasources","'",":","[","'646f346004d77b4e1424e67e","'",",","'646f346004d77b4e1424e695","'","]",",","'id","'",":","'646f34608a5613b57d8b73c9","'",",","'img_type","'",":","'full","'",",","'type","'",":","'Images","'",",","...","}","]"]
code: def get_datasets(
      self, shared: Optional[bool] = False
  ) -> List[DatasetData]:
      """Returns all datasets owned by the current user.
  
      There can be multiple datasets with the same name accessible to the current
      user. This can happen if either:
      * A dataset has been explicitly shared with the user
      * The user has access to team datasets
      The `shared` flag controls whether these datasets are returned.
  
      Args:
          shared:
              * If False (default), returns only datasets owned by the user. In this
              case at most one dataset will be returned.
              * If True, returns datasets which have been shared with the user,
              including team datasets. Excludes user's own datasets. Can return
              multiple datasets.
              * If None, returns all datasets the users has access to. Can return
              multiple datasets.
  
      Returns:
          A list of datasets owned by the current user.
  
      Examples:
          >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
          >>> client.create_dataset("your-dataset-name", dataset_type=DatasetType.IMAGES)
          >>> client.get_datasets()
          [{'created_at': 1685009504596,
           'datasource_processed_until_timestamp': 1685009513,
           'datasources': ['646f346004d77b4e1424e67e', '646f346004d77b4e1424e695'],
           'id': '646f34608a5613b57d8b73c9',
           'img_type': 'full',
           'type': 'Images',
           ...}]
      """
      return list(self.get_datasets_iter(shared))
  
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 8 for calling the _DatasetsMixin obj's underlying member method code with example usage: obj.get_datasets(shared) and returns: list