class_docstr: An iterable dataset yielding a list of urls.
class_docstr_tok: ["An","iterable","dataset","yielding","a","list","of","urls","."]
docstr: Sample shards from the shard list with replacement.
  
  :param urls: a list of URLs as a Python list or brace notation string
docstr_tok: ["Sample","shards","from","the","shard","list","with","replacement",".",":","param","urls",":","a","list","of","URLs","as","a","Python","list","or","brace","notation","string"]
code: def __init__(
      self,
      urls,
      nshards=sys.maxsize,
      worker_seed=None,
      deterministic=True,
      epoch=-1,
  ):
      """Sample shards from the shard list with replacement.
  
      :param urls: a list of URLs as a Python list or brace notation string
      """
      super().__init__()
      urls = wds.shardlists.expand_urls(urls)
      self.urls = urls
      assert isinstance(self.urls[0], str)
      self.nshards = nshards
      self.rng = random.Random()
      self.worker_seed = (
          pytorch_worker_seed if worker_seed is None else worker_seed
      )
      self.deterministic = deterministic
      self.epoch = epoch
  
imports: import io
  import json
  import logging
  import math
  import os
  import random
  import sys
  from dataclasses import dataclass
  from functools import partial
  from itertools import islice
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import torch
  import torch.distributed
  import yaml
  from PIL import Image
  from torch.utils.data import Dataset, IterableDataset, get_worker_info
  from .class_map import load_class_map
  from .reader import Reader
  from .shared_count import SharedCount
label_desc: Use image node_id 1 to create a new ResampledShards2 object from inherited base classes: IterableDataset with example: obj = ResampledShards2(urls, nshards, worker_seed, deterministic, epoch)