Add helper function to render program graph