code: def test_word_based_define_bucket_batch_sizes(
      length_ratio, batch_sentences_multiple_of, expected_batch_sizes
  ):
      batch_type = C.BATCH_TYPE_WORD
      batch_size = 1000
      max_seq_len = 50
      buckets = data_io.define_parallel_buckets(
          max_seq_len, max_seq_len, 10, True, length_ratio
      )
      bucket_batch_sizes = data_io.define_bucket_batch_sizes(
          buckets=buckets,
          batch_size=batch_size,
          batch_type=batch_type,
          data_target_average_len=[None] * len(buckets),
          batch_sentences_multiple_of=batch_sentences_multiple_of,
      )
      for bbs, expected_batch_size in zip(
          bucket_batch_sizes, expected_batch_sizes
      ):
          assert bbs.batch_size == expected_batch_size
          expected_average_target_words_per_batch = (
              expected_batch_size * bbs.bucket[1]
          )
          assert (
              bbs.average_target_words_per_batch
              == expected_average_target_words_per_batch
          )
  
imports: import os
  import random
  from tempfile import TemporaryDirectory
  from typing import Optional, List, Tuple
  import numpy
  import pytest
  import torch
  from sockeye import constants
  from sockeye import data_io
  from sockeye import utils
  from sockeye import vocab
  from sockeye.test_utils import tmp_digits_dataset
  from sockeye.utils import SockeyeError, get_tokens, seed_rngs
label_desc: Use image node_id 12 for calling a global function with example usage: test_word_based_define_bucket_batch_sizes(length_ratio, batch_sentences_multiple_of, expected_batch_sizes) without return types