code: def set_device_from_pytest_env():
      """
      Helper function to select the right target device when this notebook is being tested.
      Call this at the start of all Jupyter notebooks.
      """
      # TODO: can we not call this ourselves right before calling into the Jupyter-notebook code?
      import os
  
      if "TEST_DEVICE" in os.environ:
          if os.environ["TEST_DEVICE"] == "cpu":
              C.device.try_set_default_device(C.device.cpu())
          else:
              C.device.try_set_default_device(C.device.gpu(0))
  
file_path: CNTK/bindings/python/cntk/tests/test_utils.py
imports: import numpy
  import scipy
  import pytest
  import cntk
label_desc: Use image node_id 4 for calling a global function with example usage: set_device_from_pytest_env() without return types