class_docstr: Wrapper that allows DataPipe to be sharded (functional name: ``sharding_filter``).
  
  After ``apply_sharding`` is called, each instance of the DataPipe (on different workers) will have every `n`-th element of the
  original DataPipe, where `n` equals to the number of instances.
  
  Args:
      source_datapipe: Iterable DataPipe that will be sharded
code: def __init__(
      self, source_datapipe: IterDataPipe, sharding_group_filter=None
  ):
      self.source_datapipe = source_datapipe
      self.sharding_group_filter = sharding_group_filter
      self.groups: Dict[int, Tuple[int, int]] = {}
      self.num_of_instances = 1
      self.instance_id = 0
      self._update_num_of_instances()
  
file_path: pytorch/torch/utils/data/datapipes/iter/sharding.py
imports: from typing import Dict, Sized, Tuple
  from torch.utils.data.datapipes._decorator import functional_datapipe
  from torch.utils.data.datapipes.datapipe import IterDataPipe
  from enum import IntEnum
label_desc: Use image node_id 1 to create a new ShardingFilterIterDataPipe object from inherited base classes: _ShardingIterDataPipe with example: obj = ShardingFilterIterDataPipe(source_datapipe, sharding_group_filter)