code: def test_partitions_are_coerced_to_lists():
      # https://github.com/dask/dask/issues/6906
      A = db.from_sequence([[1, 2], [3, 4, 5], [6], [7]])
      B = db.from_sequence(["a", "b", "c", "d"])
  
      a = random.choices(
          A.flatten(), k=B.count().compute()
      ).repartition(4)
  
      C = db.zip(B, a).compute()
      assert len(C) == 4
  
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 16 for calling a global function with example usage: test_partitions_are_coerced_to_lists() without return types