code: def http_nlg(loop, sanic_client):
      return loop.run_until_complete(sanic_client(nlg_app()))
  
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 2 for calling a global function with example usage: http_nlg(loop, sanic_client) and returns: loop