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:
              assert (
                  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
  
file_path: analytics-zoo/pyzoo/zoo/orca/learn/utils.py
imports: from zoo.common.utils import get_file_list
  from zoo.orca.data import SparkXShards
  from zoo.orca.data.utils import get_size
  from zoo.util.utils import convert_row_to_numpy
  import numpy
label_desc: Use image node_id 8 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