docstr: Fetches a list of users that have access to the dataset.
  
  Args:
      dataset_id:
          Dataset ID.
  
  Returns:
      List of email addresses of users that have write access to the dataset.
  
  Examples:
      >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
      >>> client.get_shared_users(dataset_id="MY_DATASET_ID")
      >>> ["user@something.com"]
docstr_tok: ["Fetches","a","list","of","users","that","have","access","to","the","dataset",".","Args",":","dataset_id",":","Dataset","ID",".","Returns",":","List","of","email","addresses","of","users","that","have","write","access","to","the","dataset",".","Examples",":",">",">",">","client","=","ApiWorkflowClient","(","token=","''","MY_AWESOME_TOKEN","''",")",">",">",">","client.get_shared_users","(","dataset_id=","''","MY_DATASET_ID","''",")",">",">",">","[","``","user","@","something.com","''","]"]
code: def get_shared_users(self, dataset_id: str) -> List[str]:
      """Fetches a list of users that have access to the dataset.
  
      Args:
          dataset_id:
              Dataset ID.
  
      Returns:
          List of email addresses of users that have write access to the dataset.
  
      Examples:
          >>> client = ApiWorkflowClient(token="MY_AWESOME_TOKEN")
          >>> client.get_shared_users(dataset_id="MY_DATASET_ID")
          >>> ["user@something.com"]
      """
  
      access_configs: List[
          SharedAccessConfigData
      ] = self._collaboration_api.get_shared_access_configs_by_dataset_id(
          dataset_id=dataset_id
      )
      user_emails = []
  
      # iterate through configs and find first WRITE config
      # we use the same hard rule in the frontend to communicate with the API
      # as we currently only support WRITE access
      for access_config in access_configs:
          if access_config.access_type == SharedAccessType.WRITE:
              user_emails.extend(access_config.users)
              break
  
      return user_emails
  
imports: from typing import List
  from lightly.openapi_generated.swagger_client.models import SharedAccessConfigCreateRequest, SharedAccessConfigData, SharedAccessType
label_desc: Use image node_id 2 for calling the _CollaborationMixin obj's underlying member method code with example usage: obj.get_shared_users(dataset_id) and returns: user_emails