def METHOD_NAME(name,arg,kwd,replace,_self=cmd):
    r = DEFAULT_ERROR
    from . import wizard
    try:
        full_name = 'pymol.wizard.'+name
        __import__(full_name)
    except ImportError:
        print("Error: Sorry, couldn't import the '"+name+"' wizard.")
    else:
        mod_obj = sys.modules[full_name]
        if mod_obj:
            oname = name.capitalize()
            r = DEFAULT_SUCCESS
            if hasattr(mod_obj,oname):
                kwd['_self']=_self
                try:
                    wiz = getattr(mod_obj,oname)(*arg, **kwd)
                except TypeError as e:
                    # e.g. missing argument
                    raise pymol.CmdException(str(e))
                except WizardError as e:
                    from pymol.wizard.message import Message
                    wiz = Message("Error: %s" % str(e), _self=_self)
                if wiz:
                    _self.set_wizard(wiz,replace)
                    _self.do("_ refresh_wizard")
            else:
                print("Error: Sorry, couldn't find the '"+oname+"' class.")
        else:
            print("Error: Sorry, couldn't import the '"+name+"' wizard.")
    return r