code: def user_warning(self, message, caption='Warning!'):
          
          dlg = wx.MessageDialog(self, message, caption,
                                 wx.OK | wx.CANCEL | wx.ICON_WARNING)
          if self.show_dlg(dlg) == wx.ID_OK:
              continue_bool = True
          else:
              continue_bool = False
          dlg.Destroy()
          return continue_bool
docs: Shows a dialog that warns the user about some action
  
          Parameters
          ----------
          message : message to display to user
          caption : title for dialog (default: "Warning!")
  
          Returns
          -------
          continue_bool : True or False