Adds tnrs_contexts function.