class_docstr: Creates a `Dataset` that includes only 1/`num_shards` of this dataset.
  The Dataset will contain all elements of total dataset whose index % num_shards = rank.
class_docstr_tok: ["Creates","a","`","Dataset","`","that","includes","only","1\/","`","num_shards","`","of","this","dataset",".","The","Dataset","will","contain","all","elements","of","total","dataset","whose","index","%","num_shards","=","rank","."]
code: def __init__(
      self,
      row_group,
      schema,
      num_shards=None,
      rank=None,
      transforms=None,
  ):
      self.row_group = row_group
  
      # To get the indices we expect
      self.row_group.sort()
  
      self.num_shards = num_shards
      self.rank = rank
      self.transforms = transforms
      self.datapiece = self._load_data(schema)
      self.cur = 0
      self.cur_tail = len(self.datapiece)
  
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 1 to create a new ParquetIterable object  with example: obj = ParquetIterable(row_group, schema, num_shards, rank, transforms)