code: def spark_df_to_pd_sparkxshards(
      df: "DataFrame",
      squeeze: bool = False,
      index_col=None,
      dtype=None,
      index_map=None,
  ) -> "SparkXShards":
      pd_rdd = spark_df_to_rdd_pd(
          df, squeeze, index_col, dtype, index_map
      )
      from bigdl.orca.data import SparkXShards
  
      spark_xshards = SparkXShards(pd_rdd)
      return spark_xshards
  
imports: from bigdl.dllib.utils.file_utils import get_file_list, callZooFunc
  from bigdl.dllib.utils.utils import convert_row_to_numpy
  from bigdl.dllib.utils.common import *
  from bigdl.dllib.utils.log4Error import *
  import pyspark.sql.functions
  from typing import TYPE_CHECKING, Dict, List, Optional, Type, Union
  from numpy import float32, int32
label_desc: Use image node_id 21 for calling a global function with example usage: spark_df_to_pd_sparkxshards(df, squeeze, index_col, dtype, index_map) and returns: spark_xshards