class_docstr: 可以使得 ``batch_sampler`` 对象状态恢复的 wrapper 。
  
  :param batch_sampler: 可迭代出 **数字** 或 **数字列表** 的可迭代对象。:class:`ReproduceBatchSampler` 将首先遍历一边该对象，然后将迭代
      出来的序号暂存起来，使用时按照 ``batch_size`` 的 batch 大小吐出序号列表。
  :param batch_size: 每个 batch 的大小是多少
  :param drop_last: 如果最后一个 batch 无法构成 ``batch_size`` 个 sample ，是否丢掉
  :param kwargs: fastNLP 内部使用的参数
class_docstr_tok: ["\u53ef\u4ee5\u4f7f\u5f97","``","batch_sampler","``","\u5bf9\u8c61\u72b6\u6001\u6062\u590d\u7684","wrapper","\u3002",":","param","batch_sampler",":","\u53ef\u8fed\u4ee3\u51fa","*","*","\u6570\u5b57","*","*","\u6216","*","*","\u6570\u5b57\u5217\u8868","*","*","\u7684\u53ef\u8fed\u4ee3\u5bf9\u8c61\u3002",":","class",":","`","ReproduceBatchSampler","`","\u5c06\u9996\u5148\u904d\u5386\u4e00\u8fb9\u8be5\u5bf9\u8c61\uff0c\u7136\u540e\u5c06\u8fed\u4ee3","\u51fa\u6765\u7684\u5e8f\u53f7\u6682\u5b58\u8d77\u6765\uff0c\u4f7f\u7528\u65f6\u6309\u7167","``","batch_size","``","\u7684","batch","\u5927\u5c0f\u5410\u51fa\u5e8f\u53f7\u5217\u8868\u3002",":","param","batch_size",":","\u6bcf\u4e2a","batch","\u7684\u5927\u5c0f\u662f\u591a\u5c11",":","param","drop_last",":","\u5982\u679c\u6700\u540e\u4e00\u4e2a","batch","\u65e0\u6cd5\u6784\u6210","``","batch_size","``","\u4e2a","sample","\uff0c\u662f\u5426\u4e22\u6389",":","param","kwargs",":","fastNLP","\u5185\u90e8\u4f7f\u7528\u7684\u53c2\u6570"]
code: def batch_idx_in_epoch(self):
      if self.drop_last:
          return (
              len(self.index_list) // self.batch_size
              - (len(self.index_list) - self.num_consumed_samples)
              // self.batch_size
          )
      else:
          return (
              len(self.index_list) + self.batch_size - 1
          ) // self.batch_size - (
              len(self.index_list)
              - self.num_consumed_samples
              + self.batch_size
              - 1
          ) // self.batch_size
  
imports: import os
  import math
  from copy import deepcopy
  from typing import Dict, Union, List
  from itertools import chain
  import numpy
  from fastNLP.core.dataset import DataSet
  from fastNLP.core.log import logger
  from .utils import create_array
  from abc import abstractmethod
label_desc: Use image node_id 9 for calling the ReproduceBatchSampler obj's underlying member method code with example usage: obj.batch_idx_in_epoch() and returns: unknown, unknown