code: def test_dc_context_switch():
      def f(a, *, nd):
          if nd is mx.nd:
              b = a.as_in_context(mx.cpu(1))
              c = (b - 1).as_in_context(mx.device.current_device())
          else:
              b = a.to_device(mx.cpu(1))
              c = (b - 1).to_device(mx.device.current_device())
          return [c]
  
      _assert_dc(_dc_simple_setup, f)
  
imports: import functools
  import operator
  import numpy
  import mxnet
  import mxnet._deferred_compute
  from mxnet.base import MXNetError
  from mxnet.util import TemporaryDirectory
  import pytest
label_desc: Use image node_id 20 for calling a global function with example usage: test_dc_context_switch() and returns: list