code: def test_train(spec):
      cfg_path = "/tmp/test.yaml"
      run = subprocess.run(
          [
              "dgl",
              "config",
              spec.pipeline,
              "--data",
              spec.dataset,
              "--model",
              spec.model,
              "--cfg",
              cfg_path,
          ],
          timeout=spec.timeout,
          capture_output=True,
      )
      assert (
          run.stderr is None or len(run.stderr) == 0
      ), "Found error message: {}".format(run.stderr)
      output = run.stdout.decode("utf-8")
      print(output)
  
      run = subprocess.run(
          ["dgl", "train", "--cfg", cfg_path],
          timeout=spec.timeout,
          capture_output=True,
      )
      assert (
          run.stderr is None or len(run.stderr) == 0
      ), "Found error message: {}".format(run.stderr)
      output = run.stdout.decode("utf-8")
      print(output)
  
file_path: dgl/dglgo/tests/test_pipeline.py
imports: import subprocess
  from pathlib import Path
  from typing import NamedTuple
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_train(spec) without return types