<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_installed(name):
 """ Checks whether a package with the name is already installed. :param name: the name of the package :type name: str :return: whether the package is installed :rtype: bool """

    pkgs = installed_packages()
    for pkge in pkgs:
        if pkge.name == name:
            return True
    return False