def get_installed_pypackages():
    return {p.project_name.lower(): p for p in pkg_resources.working_set}
def clear(self):
    for unused_ in range(len(self._items)):
      self.remove_item(self._items[0])