code: def to_spark_xshards(self):
      from zoo.orca.data import SparkXShards
  
      ray_ctx = RayContext.get()
      sc = ray_ctx.sc
      address = ray_ctx.redis_address
      password = ray_ctx.redis_password
      num_parts = self.num_partitions()
      partition2store = self.partition2store_name
      rdd = self.rdd.mapPartitionsWithIndex(
          lambda idx, _: get_from_ray(
              idx, address, password, partition2store
          )
      )
  
      # the reason why we trigger computation here is to ensure we get the data
      # from ray before the RayXShards goes out of scope and the data get garbage collected
      from pyspark.storagelevel import StorageLevel
  
      rdd = rdd.cache()
      result_rdd = rdd.map(
          lambda x: x
      )  # sparkxshards will uncache the rdd when gc
      spark_xshards = SparkXShards(result_rdd)
      return spark_xshards
  
imports: from collections import defaultdict
  import ray
  import ray._private.services
  import uuid
  import random
  from packaging import version
  from zoo.orca.data import XShards
  from zoo.ray import RayContext
  import logging
label_desc: Use image node_id 6 for calling the RayXShards obj's underlying member method code with example usage: obj.to_spark_xshards() and returns: spark_xshards