code: def choice(x, size):
      xp = cuda.get_array_module(x)
      y = np.random.choice(cuda.to_cpu(x), size, replace=False)
      if xp is np:
          return y
      else:
          return cuda.to_gpu(y)
  
file_path: chainercv/chainercv/links/model/fpn/misc.py
imports: from __future__ import division
  import numpy
  from chainer.backends import cuda
  import chainer.functions
  from chainercv import transforms
label_desc: Use image node_id 3 for calling a global function with example usage: choice(x, size) and returns: y, cuda