code: def _read_as_xshards(path: str) -> "SparkXShards":
      rdd, schema = ParquetDataset._read_as_dict_rdd(path)
  
      def merge_records(schema, iter):
          l = list(iter)
          result = {}
          for k in schema.keys():
              result[k] = []
          for i, rec in enumerate(l):
              for k in schema.keys():
                  result[k].append(rec[k])
          for k, v in schema.items():
              if not v.feature_type == FeatureType.IMAGE:
                  result[k] = np.stack(result[k])
  
          return [result]
  
      result_rdd = rdd.mapPartitions(
          lambda iter: merge_records(schema, iter)
      )
      xshards = SparkXShards(result_rdd)
      return xshards
  
imports: from pyspark import SparkContext
  from pyspark.sql import SparkSession
  from bigdl.dllib.nncontext import init_nncontext
  from bigdl.orca.data import SparkXShards
  from bigdl.orca.data.file import open_text, write_text
  from bigdl.orca.data.image.utils import chunks, dict_to_row, row_to_dict, encode_schema, decode_schema, SchemaField, FeatureType, DType, ndarray_dtype_to_dtype, decode_feature_type_ndarray, pa_fs
  from bigdl.orca.data.image.voc_dataset import VOCDatasets
  from bigdl.dllib.utils.common import get_node_and_core_number
  import os
  import numpy
  import random
  import io
  import math
  from bigdl.dllib.utils.log4Error import invalidInputError
  from numpy import ndarray, uint32
  from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, Union, Any
label_desc: Use image node_id 3 for calling the ParquetDataset obj's underlying member method code with example usage: obj._read_as_xshards(path) and returns: xshards, list