Such context functions are often separated out to a context file, to keep files more coherent and focused.