code: def report():
      """Return a string with a summary report of test-related variables."""
      inf = get_sys_info()
      out = []
  
      def _add(name, value):
          out.append((name, value))
  
      _add("IPython version", inf["ipython_version"])
      _add(
          "IPython commit",
          "{} ({})".format(inf["commit_hash"], inf["commit_source"]),
      )
      _add("IPython package", compress_user(inf["ipython_path"]))
      _add("Python version", inf["sys_version"].replace("\n", ""))
      _add("sys.executable", compress_user(inf["sys_executable"]))
      _add("Platform", inf["platform"])
  
      width = max(len(n) for (n, v) in out)
      out = [
          "{:<{width}}: {}\n".format(n, v, width=width)
          for (n, v) in out
      ]
  
      avail = []
      not_avail = []
  
      for k, is_avail in have.items():
          if is_avail:
              avail.append(k)
          else:
              not_avail.append(k)
  
      if avail:
          out.append("\nTools and libraries available at test time:\n")
          avail.sort()
          out.append("   " + " ".join(avail) + "\n")
  
      if not_avail:
          out.append(
              "\nTools and libraries NOT available at test time:\n"
          )
          not_avail.sort()
          out.append("   " + " ".join(not_avail) + "\n")
  
      return "".join(out)
  
imports: from __future__ import print_function
  import argparse
  import json
  import multiprocessing.pool
  import os
  import stat
  import re
  import requests
  import shutil
  import signal
  import sys
  import subprocess
  import time
  from .iptest import have, test_group_names, test_sections, StreamCapturer, test_for
  from IPython.utils.path import compress_user
  from IPython.utils.py3compat import bytes_to_str
  from IPython.utils.sysinfo import get_sys_info
  from IPython.utils.tempdir import TemporaryDirectory
  from IPython.utils.text import strip_ansi
label_desc: Use image node_id 3 for calling a global function with example usage: report() and returns: str