code: def main():
      set_up_logging()
  
      print("### Diagnostics")
      print()
  
      print("<details>")
      print("<summary>Diagnostics output</summary>")
      print()
  
      markdown_code_fence = "``````"  # seems likely to be sufficient
      print(markdown_code_fence)
      suggestions = []
      for i, check in enumerate(CHECKS):
          if i > 0:
              print()
          print("--- check: %s" % check.__name__)
          try:
              suggestions.extend(check())
          except Exception:
              traceback.print_exc(file=sys.stdout)
              pass
      print(markdown_code_fence)
      print()
      print("</details>")
  
      for suggestion in suggestions:
          print()
          print("### Suggestion: %s" % suggestion.headline)
          print()
          print(suggestion.description)
  
      print()
      print("### Next steps")
      print()
      if suggestions:
          print(
              reflow(
                  """
                  Please try each suggestion enumerated above to determine whether
                  it solves your problem. If none of these suggestions works,
                  please copy ALL of the above output, including the lines
                  containing only backticks, into your GitHub issue or comment. Be
                  sure to redact any sensitive information.
                  """
              )
          )
      else:
          print(
              reflow(
                  """
                  No action items identified. Please copy ALL of the above output,
                  including the lines containing only backticks, into your GitHub
                  issue or comment. Be sure to redact any sensitive information.
                  """
              )
          )
  
imports: import dataclasses
  import errno
  import functools
  import hashlib
  import inspect
  import logging
  import os
  import pipes
  import shlex
  import socket
  import subprocess
  import sys
  import tempfile
  import textwrap
  import traceback
label_desc: Use image node_id 20 for calling a global function with example usage: main() without return types