code: def close_all(parent):
      from ..figure import Figure
  
      windows = [
          x for x in parent.GetChildren() if isinstance(x, wx.Frame)
      ]
  
      for window in windows:
          if isinstance(window, Figure):
              window.on_close(None)
          else:
              window.Close()
  
      reset_cpfigure_position()
  
imports: import functools
  import logging
  import os
  import sys
  import numpy
  import wx
  from cellprofiler_core.image import FileImage
  from cellprofiler_core.preferences import reset_cpfigure_position
  from cellprofiler_core.preferences import get_interpolation_mode
  from cellprofiler_core.preferences import IM_NEAREST
  from cellprofiler_core.preferences import IM_BILINEAR
  from cellprofiler_core.preferences import IM_BICUBIC
  from ..None import errordialog
label_desc: Use image node_id 6 for calling a global function with example usage: close_all(parent) without return types