class_docstr: A collection of data which can be pre-processed in parallel on Spark
class_docstr_tok: ["A","collection","of","data","which","can","be","pre-processed","in","parallel","on","Spark"]
code: def __getitem__(self, key):
      def get_data(data):
          assert hasattr(
              data, "__getitem__"
          ), "No selection operation available for this XShards"
          try:
              value = data[key]
          except:
              raise Exception("Invalid key for this XShards")
          return value
  
      return SparkXShards(self.rdd.map(get_data), transient=True)
  
imports: from py4j.protocol import Py4JError
  from zoo.orca.data.utils import *
  from zoo.orca import OrcaContext
  from zoo.common.nncontext import init_nncontext
  from zoo import ZooContext, get_node_and_core_number
  from zoo.util import nest
label_desc: Use image node_id 18 for calling the SparkXShards obj's underlying member method code with example usage: obj.__getitem__(key) and returns: SparkXShards, value