This does not change existing functionality but will allow us to use this common code in the yet-to-be-created web console action as well. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=227159346