code: def test_cntk_303_deep_structured_semantic_modeling_with_lstm_networks_trainerror(
      nb,
  ):
      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. "
          )
      metrics = []
      for cell in nb.cells:
          try:
              if cell.cell_type == "code":
                  m = re.search(
                      r"Finished Evaluation.* metric = (?P<metric>\d+\.\d+)%",
                      cell.outputs[0]["text"],
                  )
                  if m:
                      metrics.append(float(m.group("metric")))
          except IndexError:
              pass
          except KeyError:
              pass
      expectedMetrics = [0.03]
      # TODO tighten tolerances
      assert numpy.allclose(expectedMetrics, metrics, atol=0.02)
  
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_303_deep_structured_semantic_modeling_with_lstm_networks_trainerror(nb) without return types