def METHOD_NAME(self):
    with self.runner("state force package") as ctx:
        for package in self.vars.name:
            pkg_name, pkg_version = self.split_name_and_version(package)
            if not self._package_in_desired_state(pkg_name, want_installed=True, version=pkg_version) or self.vars.force == "reinstall":
                ctx.run(package=package)
                if not self._package_in_desired_state(pkg_name, want_installed=True, version=pkg_version):
                    self.do_raise("failed to install %s" % package)
                self.vars.install_c += 1
        if self.verbosity >= 4:
            self.vars.run_info = ctx.run_info
    if self.vars.install_c > 0:
        self.vars.msg = "installed %s package(s)" % (self.vars.install_c)
    else:
        self.vars.msg = "package(s) already present"