def METHOD_NAME(dlg_class, xml_filename, **kwargs):
    dlg = dlg_class(xml_filename, G.ADDON.getAddonInfo('path'), 'default', '1080i', **kwargs)
    minutes = kwargs.get('minutes', 0)
    seconds = kwargs.get('seconds', 0)
    if minutes > 0 or seconds > 0:
        # Bug in Kodi AlarmClock function, if only the seconds are passed
        # the time conversion inside the function multiply the seconds by 60
        if seconds > 59 and minutes == 0:
            alarm_time = time.strftime('%M:%S', time.gmtime(seconds))
        else:
            alarm_time = f'{minutes:02d}:{seconds:02d}'
        xbmc.executebuiltin(CMD_CLOSE_DIALOG_BY_NOOP.format(alarm_time))
    dlg.doModal()
    if hasattr(dlg, 'return_value'):
        return dlg.return_value
    return None