code: def test_download_dataset__tag_missing(mocker: MockerFixture) -> None:
      mocker.patch.object(
          ApiWorkflowClient, "__init__", return_value=None
      )
      mocked_api = mocker.MagicMock()
      mocked_get_dataset_by_id = mocker.MagicMock(
          return_value=DatasetData(
              name="dataset",
              id=utils.generate_id(),
              user_id=utils.generate_id(),
              last_modified_at=0,
              type=DatasetType.IMAGES,
              img_type=ImageType.FULL,
              size_in_bytes=-1,
              n_samples=-1,
              created_at=0,
          )
      )
      mocked_api.get_dataset_by_id = mocked_get_dataset_by_id
      mocker.patch.object(
          ApiWorkflowClient, "get_all_tags", return_value=[]
      )
      client = ApiWorkflowClient()
      client._dataset_id = "dataset-id"
      client._datasets_api = mocked_api
      with pytest.raises(ValueError) as exception:
          client.download_dataset(
              output_dir="path/to/dir", tag_name="some-tag"
          )
          assert (
              str(exception.value)
              == "Dataset with id dataset-id has no tag some-tag!"
          )
  
file_path: lightly/tests/api_workflow/test_api_workflow_download_dataset.py
imports: import pytest
  from pytest_mock import MockerFixture
  from lightly.api import ApiWorkflowClient, api_workflow_download_dataset
  from lightly.openapi_generated.swagger_client.models import DatasetData, DatasetEmbeddingData, DatasetType, ImageType, TagData
  from tests.api_workflow import utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_download_dataset__tag_missing(mocker) without return types