code: def spark_xshards_to_ray_dataset(
      spark_xshards: "SparkXShards",
  ) -> "Dataset":
      from bigdl.orca.data.ray_xshards import RayXShards
      import ray
  
      ray_xshards = RayXShards.from_spark_xshards(spark_xshards)
      partition_refs = ray_xshards.get_refs()
  
      ray_dataset = ray.data.from_pandas_refs(partition_refs)
      return ray_dataset
  
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 25 for calling a global function with example usage: spark_xshards_to_ray_dataset(spark_xshards) and returns: ray_dataset