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 _for_each(self, func, *args, **kwargs):
      def utility_func(x, func, *args, **kwargs):
          try:
              result = func(x, *args, **kwargs)
          except Exception as e:
              return e
          return result
  
      result_rdd = self.rdd.map(
          lambda x: utility_func(x, func, *args, **kwargs)
      )
      return result_rdd
  
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 19 for calling the SparkXShards obj's underlying member method code with example usage: obj._for_each(func) and returns: result_rdd, result, e