code: def _getJamVersionInfo(t):
      result = []
  
      # JAM version variables.
      t.run_build_system(["---version"])
      for m in re.finditer(
          r"^\*\*\*VAR\*\*\* ([^:]*): (.*)\*\*\*$",
          t.stdout(),
          re.MULTILINE,
      ):
          name = m.group(1)
          value = m.group(2)
          if not value:
              value = []
          elif value[-1] == " ":
              value = value[:-1].split(varSeparator)
          else:
              value = "!!!INVALID!!! - '%s'" % value
          result.append("%s = %s" % (name, value))
      result.append("")
  
      # bjam -v output.
      t.run_build_system(["-v"])
      result.append("--- output for 'bjam -v' ---")
      result.append(t.stdout())
  
      # bjam --version output.
      t.run_build_system(["--version"], status=1)
      result.append("--- output for 'bjam --version' ---")
      result.append(t.stdout())
  
      return result
  
file_path: turicreate/src/external/boost/boost_1_68_0/tools/build/test/collect_debug_info.py
imports: import BoostBuild
  import os
  import re
  import sys
label_desc: Use image node_id 5 for calling a global function with example usage: _getJamVersionInfo(t) and returns: result