code: def _get_rescale_grad(rescale_grad, ctx=mx.cpu()):
      if not isinstance(rescale_grad, ndarray.NDArray):
          return ndarray.full(shape=(1,), val=rescale_grad, ctx=ctx)
      else:
          return rescale_grad.as_in_context(ctx)
  
imports: import math
  import numpy
  import mxnet
  from ..device import current_device
  from ..random import uniform
  from ..base import _as_list
  from .None import ndarray
label_desc: Use image node_id 11 for calling a global function with example usage: _get_rescale_grad(rescale_grad, ctx) and returns: ndarray, rescale_grad