code: def _unpack_row(jdf, fetches):
      df = DataFrame(jdf, _sql)
      row = df.first()
  
      def f(fetch):
          name = fetch.name.replace(":0", "")
          x = row[name]
          ndims = fetch.get_shape().ndims
          if ndims > 0:
              return np.array(x)
          else:
              return x
  
      l = [f(fetch) for fetch in fetches]
      if len(l) == 1:
          return l[0]
      return l
  
imports: import tensorflow
  import numpy
  import logging
  import tempfile
  import pandas
  from pyspark import RDD, SparkContext
  from pyspark.sql import SQLContext, Row, DataFrame
  from pyspark.sql.types import DoubleType, IntegerType, LongType, FloatType, ArrayType
label_desc: Use image node_id 8 for calling a global function with example usage: _unpack_row(jdf, fetches) and returns: l, l, np, x