code: def test_weighted_sampling_without_replacement():
      population = range(4)
      p = [0.01, 0.33, 0.33, 0.33]
      k = 3
      sampled = random._weighted_sampling_without_replacement(
          population=population, weights=p, k=k
      )
      assert len(set(sampled)) == k
  
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 14 for calling a global function with example usage: test_weighted_sampling_without_replacement() without return types