code: def show_dlg(self, dlg):
          
          if not self.test_mode:
              dlg.Center()
              return dlg.ShowModal()
          else:
              return dlg.GetAffirmativeId()
docs: Abstraction function that is to be used instead of dlg.ShowModal
  
          Parameters
          ----------
          dlg : dialog to ShowModal if possible