def METHOD_NAME(self):
    # Fixes a crash
    TempPath = tempfile.gettempdir()
    macroName = TempPath + os.sep + "testmacro.py"
    macroFile = open(macroName, "w")
    macroFile.write("print ('Hello, World!')")
    macroFile.close()
    name = FreeCADGui.Command.createCustomCommand(macroName)
    cmd = FreeCADGui.Command.get(name)
    cmd.run()