code: def testBatchingSchemeBuckets(self):
      scheme = data_reader.batching_scheme(
          batch_size=128,
          max_length=0,
          min_length_bucket=8,
          length_bucket_step=1.1,
      )
      boundaries, batch_sizes = (
          scheme["boundaries"],
          scheme["batch_sizes"],
      )
      self.assertEqual(len(boundaries), len(batch_sizes) - 1)
      expected_boundaries = [
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          22,
          24,
          26,
          28,
          30,
          33,
          36,
          39,
          42,
          46,
          50,
          55,
          60,
          66,
          72,
          79,
          86,
          94,
          103,
          113,
          124,
      ]
      self.assertEqual(expected_boundaries, boundaries)
      expected_batch_sizes = [
          16,
          12,
          12,
          8,
          8,
          8,
          8,
          8,
          8,
          6,
          6,
          6,
          6,
          4,
          4,
          4,
          4,
          4,
          3,
          3,
          3,
          3,
          2,
          2,
          2,
          2,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
          1,
      ]
      self.assertEqual(expected_batch_sizes, batch_sizes)
  
      scheme = data_reader.batching_scheme(
          batch_size=128,
          max_length=0,
          min_length_bucket=8,
          length_bucket_step=1.1,
          shard_multiplier=2,
      )
      boundaries, batch_sizes = (
          scheme["boundaries"],
          scheme["batch_sizes"],
      )
      self.assertAllEqual(
          [bs * 2 for bs in expected_batch_sizes], batch_sizes
      )
      self.assertEqual(expected_boundaries, boundaries)
  
      scheme = data_reader.batching_scheme(
          batch_size=128,
          max_length=0,
          min_length_bucket=8,
          length_bucket_step=1.1,
          length_multiplier=2,
      )
      boundaries, batch_sizes = (
          scheme["boundaries"],
          scheme["batch_sizes"],
      )
      self.assertAllEqual(
          [b * 2 for b in expected_boundaries], boundaries
      )
      self.assertEqual(
          [max(1, bs // 2) for bs in expected_batch_sizes], batch_sizes
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tempfile
  import numpy
  from six.moves import range
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import data_reader
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 7 for calling the DataReaderTest obj's underlying member method code with example usage: obj.testBatchingSchemeBuckets() without return types