code: def test_choices_with_more_bag_partitons():
      # test with npartitions > split_every
      seq = range(100)
      sut = db.from_sequence(seq, npartitions=10)
      li = list(random.choices(sut, k=10, split_every=8).compute())
      assert sut.map_partitions(len).compute() == (
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
      )
      assert len(li) == 10
      assert all(i in seq for i in li)
  
imports: from __future__ import annotations
  import math
  import random
  import pytest
  import dask.bag
  from dask.bag import random
label_desc: Use image node_id 6 for calling a global function with example usage: test_choices_with_more_bag_partitons() without return types