class_docstr: A collection of data which can be pre-processed in parallel.
class_docstr_tok: ["A","collection","of","data","which","can","be","pre-processed","in","parallel","."]
docstr: Returns a list that contains all of the elements in this XShards
  
  :return: list of elements
docstr_tok: ["Returns","a","list","that","contains","all","of","the","elements","in","this","XShards",":","return",":","list","of","elements"]
code: def collect(self):
      """
  
      Returns a list that contains all of the elements in this XShards
  
      :return: list of elements
      """
      pass
  
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 2 for calling the XShards obj's underlying member method code with example usage: obj.collect() without return types