@NotNull
  public static Map<String, String> activateVirtualEnv(@NotNull Sdk sdk) {
    final Map<String, String> cached = sdk.getUserData(ENVIRONMENT_KEY);
    if (cached != null) return cached;

    final String sdkHome = sdk.getHomePath();
    if (sdkHome == null || sdkHome.trim().isEmpty()) {
      // homePath is empty (not null) by default.
      // If we cache values when path is empty, we would stuck with empty env and never reread it once path set
      LOG.warn("homePath is null or empty, skipping env loading for " + sdk.getName());
      return Collections.emptyMap();
    }

    var additionalData = ObjectUtils.tryCast(sdk.getSdkAdditionalData(), PythonSdkAdditionalData.class);
    if (additionalData == null) {
      return Collections.emptyMap();
    }
    final Map<String, String> environment = activateVirtualEnv(sdkHome);
    sdk.putUserData(ENVIRONMENT_KEY, environment);
    return environment;
  }
@NotNull
  public static Map<String, String> activateVirtualEnv(@NotNull Sdk sdk)