def get_last_value_from_timeseries(timeseries):
if not timeseries:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>for metric, points in timeseries.items():<EOL><INDENT>return next((p['<STR_LIT:y>'] for p in reversed(points) if p['<STR_LIT:y>'] > <NUM_LIT:0>), <NUM_LIT:0>)<EOL><DEDENT>
Gets the most recent non-zero value for a .last metric or zero
    for empty data.