PySourcePosition (@NotNull final String filePath, final int line) { File file = new File(filePath); if (file.exists()) { return new PyLocalSourcePosition(file.getPath(), line); } else { return new PyRemoteSourcePosition(filePath, line); } }