code: def pack_penv(conda_name, output_name):
      import tempfile
  
      tmp_dir = tempfile.mkdtemp()
      tmp_path = "{}/{}.tar.gz".format(tmp_dir, output_name)
      print("Start to pack current python env")
      pack_conda_main(conda_name, tmp_path)
      print("Packing has been completed: {}".format(tmp_path))
      return tmp_path
  
imports: import glob
  from bigdl.dllib.utils.file_utils import Sample
  import numpy
  from pyspark.ml.linalg import DenseVector, SparseVector, VectorUDT
  import sys
  import os
  import re
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 6 for calling a global function with example usage: pack_penv(conda_name, output_name) and returns: tmp_path