code: def collect_info(info):
      error = False
      info_add = info.add
  
      for collect_func in (
          # collect_urandom() must be the first, to check the getrandom() status.
          # Other functions may block on os.urandom() indirectly and so change
          # its state.
          collect_urandom,
          collect_builtins,
          collect_cc,
          collect_curses,
          collect_datetime,
          collect_decimal,
          collect_expat,
          collect_fips,
          collect_gdb,
          collect_gdbm,
          collect_get_config,
          collect_locale,
          collect_os,
          collect_platform,
          collect_pwd,
          collect_readline,
          collect_resource,
          collect_socket,
          collect_sqlite,
          collect_ssl,
          collect_subprocess,
          collect_sys,
          collect_sysconfig,
          collect_testcapi,
          collect_testinternalcapi,
          collect_tempfile,
          collect_time,
          collect_tkinter,
          collect_windows,
          collect_zlib,
          collect_libregrtest_utils,
          # Collecting from tests should be last as they have side effects.
          collect_test_socket,
          collect_support,
          collect_support_os_helper,
          collect_support_socket_helper,
          collect_support_threading_helper,
      ):
          try:
              collect_func(info_add)
          except Exception:
              error = True
              print(
                  "ERROR: %s() failed" % (collect_func.__name__),
                  file=sys.stderr,
              )
              traceback.print_exc(file=sys.stderr)
              print(file=sys.stderr)
              sys.stderr.flush()
  
      return error
  
imports: import errno
  import re
  import sys
  import traceback
  import warnings
label_desc: Use image node_id 41 for calling a global function with example usage: collect_info(info) and returns: error