code: def test_apply_bilou_schema(
      whitespace_tokenizer: WhitespaceTokenizer,
  ):
      message_1 = Message.build(
          text="Germany is part of the European Union", intent="inform"
      )
      message_1.set(
          ENTITIES,
          [
              {
                  "start": 0,
                  "end": 7,
                  "value": "Germany",
                  "entity": "location",
              },
              {
                  "start": 23,
                  "end": 37,
                  "value": "European Union",
                  "entity": "organisation",
              },
          ],
      )
  
      message_2 = Message.build(
          text="Berlin is the capital of Germany", intent="inform"
      )
      message_2.set(
          ENTITIES,
          [
              {
                  "start": 0,
                  "end": 6,
                  "value": "Berlin",
                  "entity": "location",
              },
              {
                  "start": 25,
                  "end": 32,
                  "value": "Germany",
                  "entity": "location",
              },
          ],
      )
  
      training_data = TrainingData([message_1, message_2])
  
      whitespace_tokenizer.process_training_data(training_data)
  
      bilou_utils.apply_bilou_schema(training_data)
  
      assert message_1.get(BILOU_ENTITIES) == [
          "U-location",
          "O",
          "O",
          "O",
          "O",
          "B-organisation",
          "L-organisation",
      ]
      assert message_2.get(BILOU_ENTITIES) == [
          "U-location",
          "O",
          "O",
          "O",
          "O",
          "U-location",
      ]
  
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 5 for calling a global function with example usage: test_apply_bilou_schema(whitespace_tokenizer) without return types