def METHOD_NAME(model, hints, for_write):
    db = get_db_for_partitioned_model(model, hints)
    if for_write or not allow_read_from_plproxy_standby():
        return db
    return select_plproxy_db_for_read(db)