code: def _make_sharded_datapipe(
      root: str, dataset_size: int
  ) -> IterDataPipe[Dict[str, Any]]:
      dp = IoPathFileLister(root=root)
      dp = SharderDataPipe(dp)
      dp = dp.shuffle(buffer_size=INFINITE_BUFFER_SIZE)
      dp = IoPathFileOpener(dp, mode="rb")
      dp = PicklerDataPipe(dp)
      # dp = dp.cycle(2)
      dp = TakerDataPipe(dp, dataset_size)
      return dp
  
imports: import csv
  import functools
  import pathlib
  import pickle
  from typing import Any, BinaryIO, Callable, Dict, IO, Iterator, List, Sequence, Sized, Tuple, TypeVar, Union
  import torch
  import torch.distributed
  import torch.utils.data
  from torchdata.datapipes.iter import IoPathFileLister, IoPathFileOpener, IterDataPipe, ShardingFilter, Shuffler
  from torchvision.prototype.utils._internal import fromfile
label_desc: Use image node_id 10 for calling a global function with example usage: _make_sharded_datapipe(root, dataset_size) and returns: dp