code: def test_tags_to_ids():
      message = Message.build(
          text="Germany is part of the European Union"
      )
      message.set(
          BILOU_ENTITIES,
          [
              "U-location",
              "O",
              "O",
              "O",
              "O",
              "B-organisation",
              "L-organisation",
          ],
      )
  
      tag_id_dict = {
          "O": 0,
          "U-location": 1,
          "B-organisation": 2,
          "L-organisation": 3,
      }
  
      tags = bilou_utils.bilou_tags_to_ids(message, tag_id_dict)
  
      assert tags == [1, 0, 0, 0, 0, 2, 3]
  
file_path: rasa/tests/nlu/utils/test_bilou_utils.py
imports: import logging
  from typing import Text, List, Optional
  from _pytest.logging import LogCaptureFixture
  import pytest
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
  import rasa.nlu.utils.bilou_utils
  from rasa.nlu.constants import BILOU_ENTITIES
  from rasa.shared.nlu.constants import ENTITIES
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 3 for calling a global function with example usage: test_tags_to_ids() without return types