def METHOD_NAME(cls, ctx, op):
    inputs, device_id, xp = as_same_device(
        [ctx[c.key] for c in op.inputs], device=op.device, ret_extra=True
    )
    indices = inputs[0]
    with device(device_id):
        outputs = xp.unravel_index(indices, op.dims, order=op.order)
        for o, output in zip(op.outputs, outputs):
            ctx[o.key] = output