code: def set_close_on_exec(stream):
      if library.python.windows.on_win():
          library.python.windows.set_handle_information(
              stream, inherit=False
          )
      else:
          import fcntl
  
          fcntl.fcntl(stream, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
  
imports: import errno
  import logging
  import os
  import sys
  import library.python.windows
label_desc: Use image node_id 1 for calling a global function with example usage: set_close_on_exec(stream) without return types