def METHOD_NAME(self, editor: Gio.AppInfo, pkexec: str):
    keyfile = self._get_keyfile(editor)
    if keyfile is None:
        return None
    try:
        commandline = keyfile.get_string("Desktop Entry", "Exec")
        command = shlex.join([pkexec] + shlex.split(commandline))
        keyfile.set_string("Desktop Entry", "Exec", command)
    except GLib.Error:
        return None
    desktop = Gio.DesktopAppInfo.new_from_keyfile(keyfile)
    if desktop is None:
        return None
    return desktop