docstr: Test the device context is preserved after pickling.
docstr_tok: ["Test","the","device","context","is","preserved","after","pickling","."]
code: def test_context_is_preserved(self) -> None:
      """Test the device context is preserved after pickling."""
      assert "CUDA_VISIBLE_DEVICES" not in os.environ.keys()
      bst = load_pickle(model_path)
      config = bst.save_config()
      config = json.loads(config)
      assert config["learner"]["generic_param"]["device"] == "cuda:0"
  
file_path: xgboost/tests/python-gpu/load_pickle.py
imports: import json
  import os
  import numpy
  import pytest
  from test_gpu_pickling import build_dataset, load_pickle, model_path
  import xgboost
  from xgboost import testing
label_desc: Use image node_id 3 for calling the TestLoadPickle obj's underlying member method code with example usage: obj.test_context_is_preserved() without return types