code: def test_choices_k_equal_bag_size_with_unbalanced_partitions():
      seq = range(10)
      sut = db.from_sequence(seq, partition_size=9)
      li = list(random.choices(sut, k=10).compute())
      assert sut.map_partitions(len).compute() == (9, 1)
      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 5 for calling a global function with example usage: test_choices_k_equal_bag_size_with_unbalanced_partitions() without return types