code: def test_mallocFromPoolAsync(self):
      # also test create/destroy a pool
      props = runtime.MemPoolProps(
          runtime.cudaMemAllocationTypePinned,
          runtime.cudaMemHandleTypeNone,
          runtime.cudaMemLocationTypeDevice,
          0,
      )  # on device 0
      pool = runtime.memPoolCreate(props)
      assert pool > 0
      s = cupy.cuda.Stream()
      ptr = runtime.mallocFromPoolAsync(128, pool, s.ptr)
      assert ptr > 0
      runtime.freeAsync(ptr, s.ptr)
      runtime.memPoolDestroy(pool)
  
file_path: cupy/tests/cupy_tests/cuda_tests/test_runtime.py
imports: import pickle
  import pytest
  import cupy
  from cupy.cuda import driver
  from cupy.cuda import nvrtc
  from cupy.cuda import runtime
label_desc: Use image node_id 1 for calling the TestMemPool obj's underlying member method code with example usage: obj.test_mallocFromPoolAsync() without return types