code: def close_directory_handle(handle):
      try:
          CancelIoEx(
              handle, None
          )  # force ReadDirectoryChangesW to return
          CloseHandle(handle)  # close directory handle
      except WindowsError:
          try:
              CloseHandle(handle)  # close directory handle
          except:
              return
  
imports: from __future__ import with_statement
  import ctypes.wintypes
  from functools import reduce
label_desc: Use image node_id 6 for calling a global function with example usage: close_directory_handle(handle) without return types