code: def test_wit_data():
      td = load_data("data/examples/wit/demo-flights.json")
      assert not td.is_empty()
      assert td.entity_examples == [
          Message(
              {
                  "intent": "flight_booking",
                  "entities": [
                      {
                          "entity": "location",
                          "start": 19,
                          "end": 25,
                          "entities": [],
                          "role": "from",
                          "value": "london",
                      }
                  ],
                  "text": "i want to fly from london",
              }
          ),
          Message(
              {
                  "intent": "flight_booking",
                  "entities": [
                      {
                          "entity": "location",
                          "start": 17,
                          "end": 23,
                          "entities": [],
                          "role": "to",
                          "value": "berlin",
                      }
                  ],
                  "text": "i want to fly to berlin",
              }
          ),
          Message(
              {
                  "intent": "flight_booking",
                  "entities": [
                      {
                          "entity": "location",
                          "start": 18,
                          "end": 24,
                          "entities": [],
                          "role": "from",
                          "value": "berlin",
                      },
                      {
                          "entity": "location",
                          "start": 28,
                          "end": 33,
                          "entities": [],
                          "role": "to",
                          "value": "tokyo",
                      },
                  ],
                  "text": "i want to go from berlin to tokyo tomorrow",
              }
          ),
          Message(
              {
                  "intent": "flight_booking",
                  "entities": [
                      {
                          "entity": "location",
                          "start": 30,
                          "end": 36,
                          "entities": [],
                          "role": "from",
                          "value": "london",
                      },
                      {
                          "entity": "wit$datetime",
                          "start": 50,
                          "end": 61,
                          "entities": [],
                          "role": "datetime",
                          "value": "next monday",
                      },
                      {
                          "entity": "location",
                          "start": 40,
                          "end": 49,
                          "entities": [],
                          "role": "to",
                          "value": "amsterdam",
                      },
                  ],
                  "text": "i'm looking for a flight from london to amsterdam next monday",
              }
          ),
      ]
      assert len(td.intent_examples) == 5
      assert len(td.training_examples) == 5
      assert td.entity_synonyms == {}
      assert td.intents == {"flight_booking", USER_INTENT_OUT_OF_SCOPE}
      assert td.entities == {"location", "wit$datetime"}
  
imports: from pathlib import Path
  from typing import Text, List, Dict, Any
  from unittest.mock import Mock
  from _pytest.monkeypatch import MonkeyPatch
  import pytest
  import numpy
  import rasa.shared.utils.io
  from rasa.shared.core.constants import USER_INTENT_OUT_OF_SCOPE
  from rasa.shared.nlu.constants import TEXT, INTENT_RESPONSE_KEY, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_TYPE, ENTITIES, INTENT, ACTION_NAME, FEATURE_TYPE_SENTENCE
  from rasa.nlu.convert import convert_training_data
  from rasa.nlu.extractors.mitie_entity_extractor import MitieEntityExtractor
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.loading import guess_format, UNK, load_data
  from rasa.shared.nlu.training_data.util import get_file_format_extension, template_key_to_intent_response_key, intent_response_key_to_template_key
  import rasa.shared.data
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import UserUttered, ActionExecuted
  from rasa.shared.core.training_data.structures import StoryGraph, StoryStep
  from rasa.shared.importers.importer import TrainingDataImporter, E2EImporter
label_desc: Use image node_id 2 for calling a global function with example usage: test_wit_data() without return types