code: def transformation():
      """Do an inference on a single batch of data. In this sample server, we take data as CSV, convert
      it to a pandas data frame for internal use and then convert the predictions back to CSV (which really
      just means one prediction per line, since there's a single column.
      """
      data = None
      text = None
  
      if flask.request.content_type == "application/json":
          print("calling json launched")
          data = flask.request.get_json(silent=True)
  
          text = data["text"]
          try:
              bing_key = data["bing_key"]
          except Exception:
              bing_key = None
  
      else:
          return flask.Response(
              response="This predictor only supports JSON data",
              status=415,
              mimetype="text/plain",
          )
  
      print("Invoked with text: {}.".format(text.encode("utf-8")))
  
      # Do the prediction
      predictions = ScoringService.predict(text, bing_key)
  
      result = json.dumps(predictions[:10])
  
      return flask.Response(
          response=result, status=200, mimetype="application/json"
      )
  
file_path: fast-bert/container_ner/bert/predictor.py
imports: import os
  import json
  import pickle
  import sys
  import signal
  import traceback
  import re
  import flask
  import torch
  from fast_bert.prediction import BertNERPredictor
  from fast_bert.utils.spellcheck import BingSpellCheck
  from pathlib import Path
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: transformation() and returns: flask, flask