move more generalizable test data generation into this package.
also a flatten_list function