code: def convert_duckling_format_to_rasa(
      matches: List[Dict[Text, Any]]
  ) -> List[Dict[Text, Any]]:
      extracted = []
  
      for match in matches:
          value = extract_value(match)
          entity = {
              "start": match["start"],
              "end": match["end"],
              "text": match.get("body", match.get("text", None)),
              "value": value,
              "confidence": 1.0,
              "additional_info": match["value"],
              "entity": match["dim"],
          }
  
          extracted.append(entity)
  
      return extracted
  
imports: from __future__ import annotations
  import time
  import json
  import logging
  import os
  import requests
  from typing import Any, List, Optional, Text, Dict
  import rasa.utils.endpoints
  from rasa.engine.graph import GraphComponent, ExecutionContext
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.shared.constants import DOCS_URL_COMPONENTS
  from rasa.shared.nlu.constants import ENTITIES, TEXT
  from rasa.nlu.extractors.extractor import EntityExtractorMixin
  from rasa.shared.nlu.training_data.message import Message
  import rasa.shared.utils.io
label_desc: Use image node_id 2 for calling a global function with example usage: convert_duckling_format_to_rasa(matches) and returns: extracted