This is a nice function.

Can you add add a comment mentioning "read_replica" and this function near the DATABASES setting lms/envs/common.py, so people know of its existence?