code: def maybe_dataframe_to_xshards(
      data,
      validation_data,
      feature_cols,
      label_cols,
      mode="fit",
      num_workers=None,
      accept_str_col=False,
  ):
      from pyspark.sql import DataFrame
  
      if isinstance(data, DataFrame):
          data, validation_data = dataframe_to_xshards(
              data,
              validation_data,
              feature_cols=feature_cols,
              label_cols=label_cols,
              mode=mode,
              num_workers=num_workers,
              accept_str_col=accept_str_col,
          )
      return data, validation_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 11 for calling a global function with example usage: maybe_dataframe_to_xshards(data, validation_data, feature_cols, label_cols, mode, num_workers, accept_str_col) and returns: data,  validation_data