code: def test_multi_output_predict(self):
      from pyspark.sql.types import FloatType, ArrayType
      from pyspark.sql.functions import udf
  
      sc = OrcaContext.get_spark_context()
      rdd = sc.range(0, 100)
      spark = OrcaContext.get_spark_session()
  
      df = rdd.map(
          lambda x: [
              x,
              np.random.rand(3072).tolist(),
              np.random.rand(3072).tolist(),
          ]
      ).toDF(["index", "input_1", "input_2"])
  
      def reshape(x):
          return np.array(x).reshape([32, 32, 3]).tolist()
  
      reshape_udf = udf(
          reshape, ArrayType(ArrayType(ArrayType(FloatType())))
      )
  
      df = df.withColumn("input_1", reshape_udf(df.input_1))
      df = df.withColumn("input_2", reshape_udf(df.input_2))
  
      def model_creator(config):
          model = multi_output_model(config)
          model.compile(
              optimizer=tf.keras.optimizers.RMSprop(config["lr"]),
              loss=[
                  tf.keras.losses.MeanSquaredError(),
                  tf.keras.losses.CategoricalCrossentropy(),
              ],
          )
          return model
  
      estimator = Estimator.from_keras(
          model_creator=model_creator,
          verbose=True,
          config={"lr": 0.2},
          workers_per_node=2,
          backend="spark",
      )
  
      pred_res = estimator.predict(
          df,
          feature_cols=["input_1", "input_2"],
          output_cols=["score_output", "class_output"],
      )
      pred_res.collect()
      assert "score_output" and "class_output" in pred_res.columns
  
      # output_cols is None
      pred_df = estimator.predict(
          df, feature_cols=["input_1", "input_2"]
      )
      pred_df.collect()
      assert "prediction" in pred_df.columns
  
imports: import os
  import pytest
  import shutil
  import tempfile
  from unittest import TestCase
  import numpy
  import tensorflow
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.learn.tf2 import Estimator
  from bigdl.orca import OrcaContext
label_desc: Use image node_id 9 for calling the TestTFEstimatorBasic obj's underlying member method code with example usage: obj.test_multi_output_predict() and returns: np, model