code: def nlg_response_format_spec() -> Dict[Text, Any]:
      """Expected response schema for an NLG endpoint.
  
      Used for validation of the response returned from the NLG endpoint.
      """
      return {
          "type": "object",
          "properties": {
              "text": {"type": "string"},
              "id": {"type": ["string", "null"]},
              "buttons": {
                  "type": ["array", "null"],
                  "items": {"type": "object"},
              },
              "elements": {
                  "type": ["array", "null"],
                  "items": {"type": "object"},
              },
              "attachment": {"type": ["object", "null"]},
              "image": {"type": ["string", "null"]},
              "custom": {"type": "object"},
          },
      }
  
file_path: rasa/rasa/core/nlg/callback.py
imports: import json
  import logging
  from typing import List, Text, Any, Dict, Optional
  from rasa.core.constants import DEFAULT_REQUEST_TIMEOUT
  from rasa.core.nlg.generator import NaturalLanguageGenerator, ResponseVariationFilter
  from rasa.shared.core.trackers import DialogueStateTracker, EventVerbosity
  from rasa.shared.exceptions import RasaException
  from rasa.utils.endpoints import EndpointConfig
label_desc: Use image node_id 1 for calling a global function with example usage: nlg_response_format_spec() and returns: dict