code: def test_single_num_batch(self, shuffle, drop_last, num):
      # 数量不够不报错
      for num in [2, 7, 14, 15, 70, 71]:
          dataset = DatasetWithVaryLength(num_of_data=num)
          before_batch_size = 7
          re_batchsampler = BucketedBatchSampler(
              dataset,
              length=dataset.data,
              batch_size=before_batch_size,
              num_batch_per_bucket=10,
              drop_last=drop_last,
              shuffle=shuffle,
          )
          count = len(list(iter(re_batchsampler)))
          if drop_last:
              assert count == num // before_batch_size, num
          else:
              assert (
                  count
                  == (num + before_batch_size - 1) // before_batch_size
              ), num
  
imports: import numpy
  import pytest
  from itertools import chain
  from copy import deepcopy
  from array import array
  from tests.helpers.datasets.normal_data import NormalSampler, NormalBatchSampler
  from fastNLP.core.samplers import ReproduceBatchSampler, BucketedBatchSampler, RandomBatchSampler
label_desc: Use image node_id 1 for calling the TestBucketedBatchSampler obj's underlying member method code with example usage: obj.test_single_num_batch(shuffle, drop_last, num) without return types