Hello Google pagespeed insight team,
Javascript example containing code
lighthouse.audits['first-cpu-idle'].displayValue
where "first-cpu-idle" and "estimated-input-latency" object responses are depreciated and need to update in this page as well.
Suggesting correction, so other will not face error while testing your example code.