code: def make_app(
      predictor_factory,
      execution_params,
      batch_transform_config,
      settings,
  ):
      app = get_base_app(execution_params)
  
      if batch_transform_config is not None:
          invocations_fn = batch_inference_invocations(
              predictor_factory, batch_transform_config, settings
          )
      else:
          invocations_fn = inference_invocations(predictor_factory)
  
      app.route("/invocations", methods=["POST"])(invocations_fn)
      return app
  
imports: import json
  import logging
  import multiprocessing
  import os
  import signal
  import time
  import traceback
  from queue import Empty
  from typing import Callable, Iterable, List, NamedTuple, Set, Tuple
  from typing_extensions import Literal
  from flask import Flask, Response, jsonify, request
  from gluonts.dataset.common import ListDataset
  from gluonts.dataset.jsonl import encode_json
  from gluonts.model.forecast import Forecast, Quantile
  from gluonts.pydantic import BaseModel, Field
  from gluonts.shell.util import forecaster_type_by_name
label_desc: Use image node_id 9 for calling a global function with example usage: make_app(predictor_factory, execution_params, batch_transform_config, settings) and returns: app