code: def test_duckling_entity_extractor_with_multiple_extracted_dates(
      create_duckling: Callable[
          [Dict[Text, Any]], DucklingEntityExtractor
      ]
  ):
      duckling = create_duckling(
          {"dimensions": ["time"], "timezone": "UTC"}
      )
  
      with responses.RequestsMock() as rsps:
          rsps.add(
              responses.POST,
              "http://localhost:8000/parse",
              json=[
                  {
                      "body": "Today",
                      "start": 0,
                      "value": {
                          "values": [
                              {
                                  "value": "2018-11-13T00:00:00.000-08:00",
                                  "grain": "day",
                                  "type": "value",
                              }
                          ],
                          "value": "2018-11-13T00:00:00.000-08:00",
                          "grain": "day",
                          "type": "value",
                      },
                      "end": 5,
                      "dim": "time",
                      "latent": False,
                  },
                  {
                      "body": "the 5th",
                      "start": 9,
                      "value": {
                          "values": [
                              {
                                  "value": "2018-12-05T00:00:00.000-08:00",
                                  "grain": "day",
                                  "type": "value",
                              },
                              {
                                  "value": "2019-01-05T00:00:00.000-08:00",
                                  "grain": "day",
                                  "type": "value",
                              },
                              {
                                  "value": "2019-02-05T00:00:00.000-08:00",
                                  "grain": "day",
                                  "type": "value",
                              },
                          ],
                          "value": "2018-12-05T00:00:00.000-08:00",
                          "grain": "day",
                          "type": "value",
                      },
                      "end": 16,
                      "dim": "time",
                      "latent": False,
                  },
                  {
                      "body": "5th of May",
                      "start": 13,
                      "value": {
                          "values": [
                              {
                                  "value": "2019-05-05T00:00:00.000-07:00",
                                  "grain": "day",
                                  "type": "value",
                              },
                              {
                                  "value": "2020-05-05T00:00:00.000-07:00",
                                  "grain": "day",
                                  "type": "value",
                              },
                              {
                                  "value": "2021-05-05T00:00:00.000-07:00",
                                  "grain": "day",
                                  "type": "value",
                              },
                          ],
                          "value": "2019-05-05T00:00:00.000-07:00",
                          "grain": "day",
                          "type": "value",
                      },
                      "end": 23,
                      "dim": "time",
                      "latent": False,
                  },
                  {
                      "body": "tomorrow",
                      "start": 37,
                      "value": {
                          "values": [
                              {
                                  "value": "2018-11-14T00:00:00.000-08:00",
                                  "grain": "day",
                                  "type": "value",
                              }
                          ],
                          "value": "2018-11-14T00:00:00.000-08:00",
                          "grain": "day",
                          "type": "value",
                      },
                      "end": 45,
                      "dim": "time",
                      "latent": False,
                  },
              ],
          )
  
          messages = [
              Message(
                  data={
                      TEXT: "Today is the 5th of May. Let us meet tomorrow."
                  }
              )
          ]
          parsed_messages = duckling.process(messages)
  
          assert len(parsed_messages) == 1
          entities = parsed_messages[0].get("entities")
          assert len(entities) == 4
  
file_path: rasa/tests/nlu/extractors/test_duckling_entity_extractor.py
imports: from typing import Callable, Dict, Text, Any
  import pytest
  import responses
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.nlu.extractors.duckling_entity_extractor import DucklingEntityExtractor
  from rasa.shared.nlu.constants import TEXT
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 2 for calling a global function with example usage: test_duckling_entity_extractor_with_multiple_extracted_dates(create_duckling) without return types