code: def check_install_conflicts(to_install):
      # type: (List[InstallRequirement]) -> Tuple[PackageSet, CheckResult]
      
      # Start from the current state
      package_set, _ = create_package_set_from_installed()
      # Install packages
      would_be_installed = _simulate_installation_of(to_install, package_set)
  
      # Only warn about directly-dependent packages; create a whitelist of them
      whitelist = _create_whitelist(would_be_installed, package_set)
  
      return (
          package_set,
          check_package_set(
              package_set, should_ignore=lambda name: name not in whitelist
          )
      )
docs: For checking if the dependency graph would be consistent after \
      installing given requirements