class_docstr: 随机顺序的 Sampler 。
  
  :param dataset: 实现了 __len__ 方法的数据容器
  :param shuffle: 是否在每次 iterate 的时候打乱顺序
  :param seed: 随机数种子
  :param kwargs: fastNLP 内部使用的参数
class_docstr_tok: ["\u968f\u673a\u987a\u5e8f\u7684","Sampler","\u3002",":","param","dataset",":","\u5b9e\u73b0\u4e86","__len__","\u65b9\u6cd5\u7684\u6570\u636e\u5bb9\u5668",":","param","shuffle",":","\u662f\u5426\u5728\u6bcf\u6b21","iterate","\u7684\u65f6\u5019\u6253\u4e71\u987a\u5e8f",":","param","seed",":","\u968f\u673a\u6570\u79cd\u5b50",":","param","kwargs",":","fastNLP","\u5185\u90e8\u4f7f\u7528\u7684\u53c2\u6570"]
docstr: 当前迭代还有多少个 sample 结束。表示的是 **当前 rank** 的还剩多少
docstr_tok: ["\u5f53\u524d\u8fed\u4ee3\u8fd8\u6709\u591a\u5c11\u4e2a","sample","\u7ed3\u675f\u3002\u8868\u793a\u7684\u662f","*","*","\u5f53\u524d","rank","*","*","\u7684\u8fd8\u5269\u591a\u5c11"]
code: def num_left_samples(self):
      """
      当前迭代还有多少个 sample 结束。表示的是 **当前 rank** 的还剩多少
      """
      num_consumed_samples = self.num_consumed_samples
      return (
          math.ceil(
              (self.num_samples - num_consumed_samples)
              / self.num_replicas
          )
          if self.pad
          else math.floor(
              (
                  (self.num_samples - num_consumed_samples)
                  / self.num_replicas
              )
          )
      )
  
imports: from typing import Dict, List, Union, Sequence
  import math
  import numpy
  from fastNLP.core.log import logger
  from fastNLP.core.dataset import DataSet
label_desc: Use image node_id 10 for calling the RandomSampler obj's underlying member method code with example usage: obj.num_left_samples() and returns: unknown