code: def get_installed_packages(site_packages, site_packages_64):
          
          import pkg_resources
  
          package_to_keep = []
          if os.path.isdir(site_packages):
              package_to_keep += os.listdir(site_packages)
          if os.path.isdir(site_packages_64):
              package_to_keep += os.listdir(site_packages_64)
  
          package_to_keep = [x.lower() for x in package_to_keep]
  
          installed_packages = {package.project_name.lower(): package.version for package in
                                pkg_resources.WorkingSet()
                                if package.project_name.lower() in package_to_keep
                                or package.location.lower() in [site_packages.lower(), site_packages_64.lower()]}
  
          return installed_packages
docs: Returns a dict of installed packages that Zappa cares about.