code: def local_gpua_multinomial(op, context_name, inputs, outputs):
      # TODO : need description for function
  
      if len(inputs) == 2:
          p, u = inputs
          n_samples = 1
      else:
          p, u, n_samples = inputs
      try:
          if get_scalar_constant_value(n_samples) != 1:
              return None
      except NotScalarConstantError:
          return None
      (m,) = outputs
      gpu_op = GPUAMultinomialFromUniform(op.odtype)
      return GpuDimShuffle([False, False], [1, 0])(gpu_op(p, u))
  
imports: from __future__ import absolute_import, print_function, division
  import warnings
  import theano
  import theano.sandbox.multinomial
  from theano import Apply
  from theano.gof import Op
  from theano.tensor import NotScalarConstantError, get_scalar_constant_value
  from .basic_ops import as_gpuarray_variable, infer_context_name, GpuKernelBase, Kernel, gpuarray_helper_inc_dir
  from .opt import register_opt, op_lifter, register_opt2
  from .type import GpuArrayType
  from .elemwise import GpuDimShuffle
  from theano.scalar import as_scalar
  from .fp16_help import write_w, load_w, work_dtype
label_desc: Use image node_id 1 for calling a global function with example usage: local_gpua_multinomial(op, context_name, inputs, outputs) and returns: GpuDimShuffle, None, None