# Script Block Examples – Green Classify

This topic contains sample code that stores the found tag and the each score for High Detail mode.

    var greenView = sample.Markings.Single().Value.Views.SingleOrDefault() as ViDi2.IGreenView;

    if (greenView != null)

    {

    $greenHDMTool_BestScore = greenView.BestTag.Score;

    return greenView.BestTag.Name == "normal";

    }

    else return false;

Here is the another sample script for Green Classify.

    var greenMarkings = $Tasks.Task.DeepLearningRuntimeBlock.Sample.Markings["Classify"] as IGreenMarking;

    var bestTag= greenMarkings.Views.First().BestTag.Name;

    return bestTag;

- Convert Runtime Block's Sample object to an IGreenMarking object
var greenMarkings = $Tasks.Task.DeepLearningRuntimeBlock.Sample.Markings["Classify"] as IGreenMarking;
- Get the Best Tag Result from the Green Markings
This line of code presumes that there is only one view.
var bestTag= greenMarkings.Views.First().BestTag.Name;
- Return the resultString to the Task level
return bestTag;