code: def postprocess(predict_out, texts):
      """
      Convert model's output tensor to pornography label
      """
      result = []
      predict_out = predict_out.as_ndarray()
      for index in range(len(texts)):
          result_i = {}
          result_i["text"] = texts[index]["origin"]
          label = int(np.argmax(predict_out[index]))
          if label == 0:
              key = "not_porn"
          else:
              key = "porn"
          result_i["porn_detection_label"] = label
          result_i["porn_detection_key"] = key
          result_i["porn_probs"] = float("%.4f" % predict_out[index, 1])
          result_i["not_porn_probs"] = float(
              "%.4f" % (predict_out[index, 0])
          )
          result.append(result_i)
      return result
  
imports: import io
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: postprocess(predict_out, texts) and returns: result