code: def is_installed(self, pkgname):
          
  
          return any(d for d in self.get_distributions() if d.project_name == pkgname)
docs: Given a package name, returns whether it is installed in the environment
  
          :param str pkgname: The name of a package
          :return: Whether the supplied package is installed in the environment
          :rtype: bool