code: def create_response_generator(generator):
      for generated_message in generator:
          if isinstance(generated_message, GeneratedMessage):
              line = generated_message.to_json_line()
              yield line
  
imports: import types
  from starlette.endpoints import HTTPEndpoint
  from starlette.exceptions import HTTPException
  from starlette.requests import Request
  from starlette.responses import JSONResponse, StreamingResponse
  from fiftyone.server.decorators import route
  from .executor import execute_or_delegate_operator, resolve_type, resolve_placement, resolve_execution_options, ExecutionContext
  from .message import GeneratedMessage
  from .permissions import PermissionedOperatorRegistry
label_desc: Use image node_id 1 for calling a global function with example usage: create_response_generator(generator) without return types