code: def test_create_tag_from_filenames__tag_exists(
      mocker: MockerFixture,
  ) -> None:
      tag_name = "some-tag"
      tags = _get_tags(
          dataset_id=utils.generate_id(), tag_name=tag_name
      )
      mocker.patch.object(
          ApiWorkflowClient, "__init__", return_value=None
      )
      mocker.patch.object(
          ApiWorkflowClient, "get_all_tags", return_value=tags
      )
  
      client = ApiWorkflowClient()
  
      with pytest.raises(RuntimeError) as exception:
          client.create_tag_from_filenames(
              fnames_new_tag=["file"], new_tag_name=tag_name
          )
          assert (
              str(exception.value)
              == "There already exists a tag with tag_name some-tag"
          )
  
file_path: lightly/tests/api_workflow/test_api_workflow_tags.py
imports: from typing import List, Optional
  import pytest
  from pytest_mock import MockerFixture
  from lightly.api import ApiWorkflowClient
  from lightly.api.api_workflow_tags import TagDoesNotExistError
  from lightly.openapi_generated.swagger_client.models import TagCreator, TagData
  from tests.api_workflow import utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_create_tag_from_filenames__tag_exists(mocker) without return types