This is similar to use_read_replica_if_available(),
but it just returns either 'read_replica' or
'default', for use with the Django ORM using()
method. Syntactically, it fits nicer with queryset
method-call chains.
This is the first in a series of commits to create
a Python API for the LMS program_enrollments app.
We do some general refactoring, renaming, and clean-up
in order to move toward the creation of that API.
EDUCATOR-4321