code: def _venv_match(self, installed, requirements):
          
          if not requirements:
              # special case for no requirements, where we can't actually
              # check anything: the venv is useful if nothing installed too
              return None if installed else []
  
          satisfying_deps = []
          for repo, req_deps in requirements.items():
              useful_inst = set()
              if repo not in installed:
                  # the venv doesn't even have the repo
                  return None
  
              if repo == REPO_VCS:
                  inst_deps = {VCSDependency(url) for url in installed[repo].keys()}
              else:
                  inst_deps = {Distribution(project_name=dep, version=ver)
                               for (dep, ver) in installed[repo].items()}
              for req in req_deps:
                  for inst in inst_deps:
                      if inst in req:
                          useful_inst.add(inst)
                          break
                  else:
                      # nothing installed satisfied that requirement
                      return None
  
              # assure *all* that is installed is useful for the requirements
              if useful_inst == inst_deps:
                  satisfying_deps.extend(inst_deps)
              else:
                  return None
  
          # it did it through!
          return satisfying_deps
docs: Return True if what is installed satisfies the requirements.
  
          This method has multiple exit-points, but only for False (because
          if *anything* is not satisified, the venv is no good). Only after
          all was checked, and it didn't exit, the venv is ok so return True.