code: def test_number_of_examples_per_intent():
      message_action = Message(data={"action_name": "utter_greet"})
      message_intent = Message(
          data={
              "text": "I would like the newsletter",
              "intent": "subscribe",
          }
      )
      message_non_nlu_intent = Message(data={"intent": "subscribe"})
      message_other_intent_one = Message(
          data={
              "text": "What is the weather like today?",
              "intent": "ask_weather",
          }
      )
      message_other_intent_two = Message(
          data={"text": "Will it rain today?", "intent": "ask_weather"}
      )
      message_non_nlu_other_intent_three = Message(
          data={"intent": "ask_weather"}
      )
  
      training_examples = [
          message_action,
          message_intent,
          message_non_nlu_intent,
          message_other_intent_one,
          message_other_intent_two,
          message_non_nlu_other_intent_three,
      ]
      training_data = TrainingData(training_examples=training_examples)
  
      assert (
          training_data.number_of_examples_per_intent["subscribe"] == 1
      )
      assert (
          training_data.number_of_examples_per_intent["ask_weather"]
          == 2
      )
  
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 12 for calling a global function with example usage: test_number_of_examples_per_intent() without return types