code: def test_cntk_103b_mnist_logisticregression_evalCorrect(
      nb, device_id
  ):
      if os.getenv("OS") == "Windows_NT" and sys.version_info[0] == 2:
          pytest.skip(
              "tests with Python 2.7 on Windows are not stable in the CI environment. "
          )
      testCell = [
          cell
          for cell in nb.cells
          if cell.cell_type == "code"
          and re.search(r"trainer\.test_minibatch", cell.source)
      ]
      assert len(testCell) == 1
      m = re.match(
          r"Average test error: (?P<actualEvalError>\d+\.\d+)%\r?$",
          testCell[0].outputs[0]["text"],
      )
      # TODO tighten tolerances
      assert np.isclose(
          float(m.group("actualEvalError")),
          expectedEvalErrorByDeviceId[device_id],
          atol=0.5,
      )
  
imports: import os
  import sys
  import pytest
  import re
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: test_cntk_103b_mnist_logisticregression_evalCorrect(nb, device_id) without return types