class_docstr: Samples elements randomly from a given list of indices, without replacement.
  
  Args:
      indices (sequence): a sequence of indices
      generator (Generator): Generator used in sampling.
class_docstr_tok: ["Samples","elements","randomly","from","a","given","list","of","indices",",","without","replacement",".","Args",":","indices","(","sequence",")",":","a","sequence","of","indices","generator","(","Generator",")",":","Generator","used","in","sampling","."]
code: def __init__(self, indices: Sequence[int], generator=None) -> None:
      self.indices = indices
      self.generator = generator
  
imports: from typing import Iterator, Optional, Sized, Sequence
  import math
  from ....utils import require_not_none
label_desc: Use image node_id 1 to create a new SubsetRandomSampler object from inherited base classes: Sampler with example: obj = SubsetRandomSampler(indices, generator)