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: "SparkXShards") -> Optional["SparkXShards"]:
      """
  
      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
      """
      invalidInputError(
          isinstance(other, SparkXShards),
          "other should be a SparkXShards",
      )
      invalidInputError(
          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:
          invalidInputError(
              False,
              "The two SparkXShards should have the same number of elements "
              "in each partition",
          )
      return None
  
imports: from py4j.protocol import Py4JError
  from bigdl.orca.data.utils import *
  from bigdl.orca import OrcaContext
  from bigdl.dllib.utils.common import get_node_and_core_number, get_spark_sql_context, get_spark_context
  from bigdl.dllib.utils import nest
  from bigdl.dllib.utils.log4Error import invalidInputError
  import numpy
  from typing import TYPE_CHECKING, Any
  from typing import Callable, Dict, List, Optional, Tuple, Union
label_desc: Use image node_id 25 for calling the SparkXShards obj's underlying member method code with example usage: obj.zip(other) and returns: None, zipped_shard