@Override
  public synchronized @NotNull PyPackageManager forSdk(final @NotNull Sdk sdk) {
    if (sdk instanceof Disposable) {
      LOG.assertTrue(!Disposer.isDisposed((Disposable)sdk),
                     "Requesting a package manager for an already disposed SDK " + sdk + " (" + sdk.getClass() + ")");
    }
    final String key = PythonSdkType.getSdkKey(sdk);
    PyPackageManager manager = myStandardManagers.get(key);
    if (manager == null) {
      manager = myProvidedManagers.get(key);
    }
    if (manager == null) {
      final Map<String, PyPackageManager> cache;
      PyPackageManager customPackageManager = PyCustomPackageManagers.tryCreateCustomPackageManager(sdk);
      if (customPackageManager != null) {
        cache = myProvidedManagers;
        manager = customPackageManager;
      }
      else {
        cache = myStandardManagers;
        // TODO:
        // * There should be no difference between local and "Remote" package manager
        // * But python flavor makes the difference.
        // So one must check flavor and execute appropriate command on SDK target
        // (be it localRequest or target request)

        // This is a temporary solution to support local conda
        if (PythonSdkUtil.isConda(sdk) &&
            sdk.getHomePath() != null &&
            PyCondaPackageService.getCondaExecutable(sdk.getHomePath()) != null) {
          manager = new PyCondaPackageManagerImpl(sdk);
        }
        else {
          manager = new PyTargetEnvironmentPackageManager(sdk);
        }
      }
      cache.put(key, manager);
      if (sdk instanceof Disposable) {
        Disposer.register((Disposable)sdk, () -> clearCache(sdk));
      }
      var parentDisposable = (sdk instanceof Disposable ? (Disposable)sdk : this);
      Disposer.register(parentDisposable, manager);

      if (PyPackageManager.shouldSubscribeToLocalChanges(manager)) {
        PyPackageUtil.runOnChangeUnderInterpreterPaths(sdk, manager, () -> PythonSdkType.getInstance().setupSdkPaths(sdk));
      }
    }
    return manager;
  }
@Override
  public synchronized @NotNull PyPackageManager forSdk(final @NotNull Sdk sdk)