svoid g22_runPostAnalysisLeftArrowScript(Gazelle22_ImageToRegions itr, GazelleV_LeftArrowScript.Script script) { if (script == null) ret; pcall { // def score region { ... } var fScore = script.getFunction("score"); if (fScore != null) { L regions = itr.regions.regions(); int n = l(regions); new Map scores; for (region : regions) scores.put(region, toDouble(fScore.call(null, region))); itr.scoredRegions = mapSortedByValue(scores); } } }