code: def convert_row(feature_cols, label_cols):
      def convert_for_cols(row, cols):
          result = []
          for name in cols:
              result.append(row[name])
          if len(result) == 1:
              return result[0]
          return result
  
      def transform(row):
          features = convert_for_cols(row, feature_cols)
          if label_cols:
              labels = convert_for_cols(row, label_cols)
              return features, labels
          else:
              return (features,)
  
      return transform
  
imports: import os
  import types
  import subprocess
  import cloudpickle
  from pyspark.sql import DataFrame
  from torch.utils.data import Dataset, DataLoader
  from zoo.util.utils import get_node_ip
  from zoo.orca.learn.mpi.mpi_runner import MPIRunner
  from zoo.orca.learn.mpi.utils import *
label_desc: Use image node_id 1 for calling a global function with example usage: convert_row(feature_cols, label_cols) and returns: transform, result, result, features,  labels, features