code: def test_mempool_2(ctx_factory):
      from pyopencl.tools import MemoryPool, ImmediateAllocator
      from random import randrange
  
      context = ctx_factory()
      queue = cl.CommandQueue(context)
  
      pool = MemoryPool(ImmediateAllocator(queue))
  
      for s in [
          randrange(1 << 31) >> randrange(32) for _ in range(2000)
      ] + [2**30]:
          bin_nr = pool.bin_number(s)
          asize = pool.alloc_size(bin_nr)
  
          assert asize >= s, s
          assert pool.bin_number(asize) == bin_nr, s
          assert asize < asize * (1 + 1 / 8)
  
imports: import numpy
  import numpy.linalg
  import pytest
  import pyopencl
  import pyopencl.array
  import pyopencl.cltypes
  import pyopencl.clrandom
  from pyopencl.tools import pytest_generate_tests_for_pyopencl, ImmediateAllocator, DeferredAllocator
  from pyopencl.characterize import get_pocl_version
label_desc: Use image node_id 14 for calling a global function with example usage: test_mempool_2(ctx_factory) without return types