docstr: Under invalid CUDA_VISIBLE_DEVICES, context should reset
docstr_tok: ["Under","invalid","CUDA_VISIBLE_DEVICES",",","context","should","reset"]
code: def test_context_is_removed(self) -> None:
      """Under invalid CUDA_VISIBLE_DEVICES, context should reset"""
      assert os.environ["CUDA_VISIBLE_DEVICES"] == "-1"
      bst = load_pickle(model_path)
      config = bst.save_config()
      config = json.loads(config)
      assert config["learner"]["generic_param"]["device"] == "cpu"
  
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 2 for calling the TestLoadPickle obj's underlying member method code with example usage: obj.test_context_is_removed() without return types