'Check that each term in ``terms`` computes an expected number of extra
rows for the given parameters.'

def check_extra_row_calculations(self, terms, all_sessions, start_session, end_session, min_extra_rows, expected_extra_rows):

    for term in terms:
        result = term.compute_extra_rows(all_sessions, start_session, end_session, min_extra_rows)
        self.assertEqual(result, expected_extra_rows, 'Expected    {}    extra_rows    from    {},    but    got    {}.'.format(expected_extra_rows, term, result))
