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"]
docstr: Zips this SparkXShards with another one, returning key-value pairs with the first element
  in each SparkXShards, second element in each SparkXShards, etc. Assumes that the two
  SparkXShards have the *same number of partitions* and the *same number of elements
  in each partition*(e.g. one was made through a transform_shard on the other
  
  :param other: another SparkXShards
  :return: zipped SparkXShards
docstr_tok: ["Zips","this","SparkXShards","with","another","one",",","returning","key-value","pairs","with","the","first","element","in","each","SparkXShards",",","second","element","in","each","SparkXShards",",","etc",".","Assumes","that","the","two","SparkXShards","have","the","*","same","number","of","partitions","*","and","the","*","same","number","of","elements","in","each","partition","*","(","e.g",".","one","was","made","through","a","transform_shard","on","the","other",":","param","other",":","another","SparkXShards",":","return",":","zipped","SparkXShards"]
code: def zip(self, other):
      """
  
      Zips this SparkXShards with another one, returning key-value pairs with the first element
      in each SparkXShards, second element in each SparkXShards, etc. Assumes that the two
      SparkXShards have the *same number of partitions* and the *same number of elements
      in each partition*(e.g. one was made through a transform_shard on the other
  
      :param other: another SparkXShards
      :return: zipped SparkXShards
      """
      assert isinstance(
          other, SparkXShards
      ), "other should be a SparkXShards"
      assert (
          self.num_partitions() == other.num_partitions()
      ), "The two SparkXShards should have the same number of partitions"
      try:
          rdd = self.rdd.zip(other.rdd)
          zipped_shard = SparkXShards(rdd)
          other._uncache()
          self._uncache()
          return zipped_shard
      except Exception:
          raise ValueError(
              "The two SparkXShards should have the same number of elements "
              "in each partition"
          )
  
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 14 for calling the SparkXShards obj's underlying member method code with example usage: obj.zip(other) and returns: zipped_shard