code: def pytest_generate_tests(metafunc):
      if "device_id" in metafunc.fixturenames:
          if (len(metafunc.config.option.deviceid)) > 1:
              del metafunc.config.option.deviceid[0]
  
          devices = set()
          for elem in metafunc.config.option.deviceid:
              try:
                  if elem in DEVICE_MAP:
                      devices.add(DEVICE_MAP[elem])
                  else:
                      devices.add(int(elem))
              except ValueError:
                  raise RuntimeError(
                      "invalid deviceid value '{0}', please "
                      + "use integer values or 'auto'".format(elem)
                  )
  
          metafunc.parametrize("device_id", devices, scope="session")
  
imports: import sys
  import pytest
  import cntk.cntk_py
label_desc: Use image node_id 2 for calling a global function with example usage: pytest_generate_tests(metafunc) without return types