def METHOD_NAME(self):
    self.installation = Flatpak.Installation.new_user()
    kind = Flatpak.RefKind.APP
    if self.runtime:
        kind = Flatpak.RefKind.RUNTIME
    try:
        self.cref = self.installation.get_installed_ref(kind, self.name, None, self.branch, None)
    except GLib.Error as e:
        print("%s\n\nMake sure %s is installed as a "
              "user (flatpak install --user) and specify `--runtime`"
              " if it is a runtime." % (e, self.name))
        return -1
    return 0