'Compile the given terms into a TermGraph, compute it with
initial_workspace, and compare the results with ``expected``.'

def check_terms(self, terms, expected, initial_workspace, mask, check=check_arrays):

    (start_date, end_date) = mask.index[[0, (-1)]]
    graph = ExecutionPlan(terms, all_dates=self.nyse_sessions, start_date=start_date, end_date=end_date)
    results = self.run_graph(graph, initial_workspace, mask)
    for (key, (res, exp)) in dzip_exact(results, expected).items():
        check(res, exp)
    return results
