class_docstr: Shards a given datasource by row.
class_docstr_tok: ["Shards","a","given","datasource","by","row","."]
code: def __init__(self, data_source: DataSource, rank=0, world_size=1):
      super().__init__(data_source.schema)
      self.data_source = data_source
      self.rank = rank
      self.world_size = world_size
      self.eval = data_source.eval
      self.test = data_source.test
  
imports: import json
  import logging
  import re
  from typing import Any, Dict, List, Type, TypeVar
  from pytext.config.component import Component, ComponentType
  from pytext.data.utils import shard
  from pytext.utils.data import parse_slot_string, Slot
  from pytext.utils.file_io import PathManager
label_desc: Use image node_id 1 to create a new RowShardedDataSource object from inherited base classes: ShardedDataSource with example: obj = RowShardedDataSource(data_source, rank, world_size)