HelpersAwareTargetEnvironmentRequest (@NotNull Project project, @Nullable Sdk sdk) { if (sdk == null) { throw new IllegalStateException("SDK is not defined for Run Configuration"); } else { HelpersAwareTargetEnvironmentRequest helpersAwareTargetRequest = PythonInterpreterTargetEnvironmentFactory.findPythonTargetInterpreter(sdk, project); if (helpersAwareTargetRequest == null) { throw new IllegalStateException("Cannot find execution environment for SDK " + sdk); } return helpersAwareTargetRequest; } }