private static @Nullable Sdk getFileSdk(@NotNull Project project, @NotNull VirtualFile file) {
    final Module module = ModuleUtilCore.findModuleForFile(file, project);
    if (module != null) {
      return PythonSdkUtil.findPythonSdk(module);
    }
    else {
      return findSdkForFileOutsideTheProject(project, file);
    }
  }
private static @Nullable Sdk getFileSdk(@NotNull Project project, @NotNull VirtualFile file)