class_docstr: 定制给 :class:`~fastNLP.core.dataloaders.MixDataLoader` 的 ``BatchSampler``，其功能是将传入的 ``datasets`` 按顺序采样并返回 index，
  只有上一个 dataset 处理结束后才会处理下一个。
class_docstr_tok: ["\u5b9a\u5236\u7ed9",":","class",":","`","~fastNLP.core.dataloaders.MixDataLoader","`","\u7684","``","BatchSampler","``","\uff0c\u5176\u529f\u80fd\u662f\u5c06\u4f20\u5165\u7684","``","datasets","``","\u6309\u987a\u5e8f\u91c7\u6837\u5e76\u8fd4\u56de","index\uff0c","\u53ea\u6709\u4e0a\u4e00\u4e2a","dataset","\u5904\u7406\u7ed3\u675f\u540e\u624d\u4f1a\u5904\u7406\u4e0b\u4e00\u4e2a\u3002"]
code: def __init__(
      self,
      dataset: Dict,
      batch_size: int = None,
      sampler: Union[
          List["Sampler"], Dict[str, "Sampler"], None, str
      ] = None,
      ds_ratio: Union[str, List[float], Dict[str, float]] = None,
      drop_last: bool = False,
      rank: int = -1,
      word_size: int = -1,
  ) -> None:
      super(MixSequentialSampler, self).__init__(
          dataset=dataset,
          batch_size=batch_size,
          sampler=sampler,
          ds_ratio=ds_ratio,
          drop_last=drop_last,
          rank=rank,
          word_size=word_size,
      )
  
imports: import array
  import numpy
  from typing import Union, List, Iterable, Dict
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
label_desc: Use image node_id 1 to create a new MixSequentialSampler object from inherited base classes: MixSampler with example: obj = MixSequentialSampler(dataset, batch_size, sampler, ds_ratio, drop_last, rank, word_size)