code: def process_xshards_of_pandas_dataframe(
      data,
      feature_cols,
      label_cols=None,
      validation_data=None,
      mode=None,
  ):
      data = transform_to_shard_dict(data, feature_cols, label_cols)
      if mode == "fit":
          if validation_data is not None:
              invalidInputError(
                  validation_data._get_class_name()
                  == "pandas.core.frame.DataFrame",
                  "train data and validation data should be both XShards of Pandas"
                  " DataFrame",
              )
              validation_data = transform_to_shard_dict(
                  validation_data, feature_cols, label_cols
              )
          return data, validation_data
      else:
          return data
  
imports: from contextlib import closing
  import socket
  import sys
  import tempfile
  import shutil
  from bigdl.dllib.utils import log4Error
  from bigdl.dllib.utils.common import callBigDlFunc
  from bigdl.dllib.utils.file_utils import get_file_list, is_local_path
  from bigdl.orca.data import SparkXShards
  from bigdl.orca.data.utils import get_size
  from bigdl.orca.data.file import put_local_dir_tree_to_remote, put_local_file_to_remote, get_remote_file_to_local, get_remote_dir_to_local
  from bigdl.dllib.utils.utils import convert_row_to_numpy
  from functools import partial
  import numpy
  from bigdl.orca.common import SafePickle
  import os
  import subprocess
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 16 for calling a global function with example usage: process_xshards_of_pandas_dataframe(data, feature_cols, label_cols, validation_data, mode) and returns: data,  validation_data, data