code: def test_create_dataset__error(mocker: MockerFixture) -> None:
      mocker.patch.object(
          ApiWorkflowClient, "__init__", return_value=None
      )
      mocker.patch.object(
          ApiWorkflowClient, "dataset_name_exists", return_value=True
      )
  
      client = ApiWorkflowClient()
      with pytest.raises(ValueError) as exception:
          client.create_dataset(dataset_name="name")
          assert str(exception.value) == (
              "A dataset with the name 'name' already exists! Please use "
              "the `set_dataset_id_by_name()` method instead if you intend to reuse "
              "an existing dataset."
          )
  
imports: from typing import List
  import pytest
  from pytest_mock import MockerFixture
  from lightly.api import ApiWorkflowClient, api_workflow_datasets
  from lightly.openapi_generated.swagger_client.api import DatasetsApi
  from lightly.openapi_generated.swagger_client.models import Creator, DatasetCreateRequest, DatasetData, DatasetType
  from lightly.openapi_generated.swagger_client.rest import ApiException
  from tests.api_workflow import utils
  from tests.api_workflow.mocked_api_workflow_client import MockedApiWorkflowSetup
label_desc: Use image node_id 20 for calling a global function with example usage: test_create_dataset__error(mocker) without return types