def METHOD_NAME(title: str, wx_wildcard: str, qt_wildcard: str,
                     dirname: str='') -> str:
    """
    creates a save file dialog in wx or PyQt/PySide
    """
    fname = None
    if dirname == '':
        dirname = os.getcwd()
    if _gui_mode == 'wx':
        app = wx.App(redirect=False)
        app.MainLoop()
        dlg = wx.FileDialog(None, title, dirname, "",
                            wx_wildcard, wx.SAVE)
        app.MainLoop()
        if dlg.ShowModal() == wx.ID_OK:
            filename = dlg.GetFilename()
            dirname = dlg.GetDirectory()
            fname = os.path.join(dirname, filename)
    elif _gui_mode in {'pyqt', 'pyside'}:
        # checks if QApplication already exists
        app = QApplication.instance()
        if not app: # create QApplication if it doesnt exist
            app = QApplication([])
        form = QtDialog()
        form.show()
        fname = QFileDialog.getSaveFileName(form, title,
                                            dirname, qt_wildcard)
        app.exit()
        #print("fname =", fname)
    else:
        msg = 'Could not import wx, PySide2/6, or PyQt5/6.  '\
            f'Please specify the file explicitly.\ngui_mode={_gui_mode!r}'
        raise ImportError(msg)
    return fname