code: def test_default_context():
      context = chainerx.Context()
      global_context = chainerx.Context()
  
      chainerx.set_global_default_context(None)
      chainerx.set_default_context(None)
      with pytest.raises(chainerx.ContextError):
          chainerx.get_default_context()
  
      chainerx.set_global_default_context(None)
      chainerx.set_default_context(context)
      assert chainerx.get_default_context() is context
  
      chainerx.set_global_default_context(global_context)
      chainerx.set_default_context(None)
      assert chainerx.get_default_context() is global_context
  
      chainerx.set_global_default_context(global_context)
      chainerx.set_default_context(context)
      assert chainerx.get_default_context() is context
  
file_path: chainer/tests/chainerx_tests/unit_tests/test_context.py
imports: import pytest
  import chainerx
label_desc: Use image node_id 7 for calling a global function with example usage: test_default_context() without return types