Extracting parsed code example helper function