code: def test_nlg_fill_response_text_with_json(response_text, expected):
      response = {"text": response_text}
      t = TemplatedNaturalLanguageGenerator(responses=dict())
      result = t._fill_response(
          response=response,
          filled_slots={"slot_1": "foo", "slot_2": "bar"},
      )
      assert result == {"text": expected}
  
imports: import uuid
  from typing import Text, Any
  import jsonschema
  import pytest
  from sanic import Sanic, response
  from rasa.core.nlg.callback import CallbackNaturalLanguageGenerator
  from rasa.core.nlg.response import TemplatedNaturalLanguageGenerator
  from rasa.utils.endpoints import EndpointConfig, read_endpoint_config
  from rasa.core.agent import Agent
label_desc: Use image node_id 12 for calling a global function with example usage: test_nlg_fill_response_text_with_json(response_text, expected) without return types