code: def test_bounded_budget_sampler(
      seq_lengths,
      max_num_tokens,
      max_num_sentences,
      required_batch_size_multiple,
      sort_type,
      shuffle,
      seed,
  ):
      sampler = s.BoundedBudgetSampler(
          seq_lengths,
          max_num_tokens,
          max_num_sentences,
          required_batch_size_multiple,
          sort_type=sort_type,
          shuffle=shuffle,
          seed=seed,
      )
      print(sampler)
      total_sampled_ids = []
      for batch_sample_ids in sampler:
          total_sampled_ids.extend(batch_sample_ids)
      assert len(set(total_sampled_ids)) == len(total_sampled_ids) == N
      assert sorted(total_sampled_ids) == list(
          range(len(total_sampled_ids))
      )
  
file_path: gluon-nlp/tests/test_data_sampler.py
imports: import pytest
  import numpy
  from mxnet.gluon import data
  from gluonnlp.data import sampler
label_desc: Use image node_id 9 for calling a global function with example usage: test_bounded_budget_sampler(seq_lengths, max_num_tokens, max_num_sentences, required_batch_size_multiple, sort_type, shuffle, seed) without return types