def METHOD_NAME(self) -> List[str]:
    """Get all installed packages. Used to check if dependency is installed or not.
    Returns:
        list of string names of packages that are installed
    """
    if not self._all_installed_packages:
        # Only retrieve once
        package_names: list[str] = []
        for package in metadata.distributions():
            package_name = package.metadata.get("Name")
            if package_name:
                package_names.append(package_name)
        package_names = [pn.lower() for pn in package_names]
        self._all_installed_packages = package_names
    return self._all_installed_packages