def METHOD_NAME(self):
    sm = StatementMetrics()
    rows1 = [
        {'count': 13, 'time': 2005, 'errors': 1, 'query': 'COMMIT', 'db': 'puppies', 'user': 'dog'},
        {'count': 25, 'time': 105, 'errors': 0, 'query': 'ROLLBACK', 'db': 'puppies', 'user': 'dog'},
        {'count': 1, 'time': 10005, 'errors': 0, 'query': 'select * from kennel', 'db': 'puppies', 'user': 'rover'},
        {
            'count': 99991882777665555,
            'time': 10005,
            'errors': 0,
            'query': 'update kennel set breed="dalmatian" where id = ?',
            'db': 'puppies',
            'user': 'rover',
        },
    ]
    def key(row):
        return (row['query'], row['db'], row['user'])
    metrics = ['count', 'time']
    assert [] == sm.compute_derivative_rows(rows1, metrics, key=key)
    # No changes should produce no rows
    assert [] == sm.compute_derivative_rows(rows1, metrics, key=key)
    rows2 = [
        {'count': 1, 'time': 1, 'errors': 1, 'query': 'SELECT CURRENT_TIME', 'db': 'puppies', 'user': 'dog'},
        add_to_dict(rows1[0], {'count': 0, 'time': 0, 'errors': 15}),
        add_to_dict(rows1[1], {'count': 1, 'time': 15, 'errors': 0}),
        add_to_dict(rows1[2], {'count': 20, 'time': 900, 'errors': 0}),
        add_to_dict(rows1[3], {'count': 7, 'time': 0.5, 'errors': 0}),
    ]
    expected = [
        # First row only incremented 'errors' which is not a tracked metric, so it is omitted from the output
        {'count': 1, 'time': 15, 'errors': 0, 'query': 'ROLLBACK', 'db': 'puppies', 'user': 'dog'},
        {'count': 20, 'time': 900, 'errors': 0, 'query': 'select * from kennel', 'db': 'puppies', 'user': 'rover'},
        {
            'count': 7,
            'time': 0.5,
            'errors': 0,
            'query': 'update kennel set breed="dalmatian" where id = ?',
            'db': 'puppies',
            'user': 'rover',
        },
    ]
    expected_by_query = {v['query']: v for v in expected}
    derived_rows = {v['query']: v for v in sm.compute_derivative_rows(rows2, metrics, key=key)}
    assert expected_by_query == derived_rows
    # No changes should produce no rows
    assert [] == sm.compute_derivative_rows(rows2, metrics, key=key)