code: def my_pinned_allocator(bsize):
      return cupy.cuda.memory.MemoryPointer(PMemory(bsize), 0)
  
imports: import numpy
  import cupy
  import torch
  import os
  from torch.utils.dlpack import to_dlpack
  from torch.utils.dlpack import from_dlpack
label_desc: Use image node_id 1 for calling a global function with example usage: my_pinned_allocator(bsize) and returns: cupy