Actually, that’s what the representative in the district adjacent to mine does. Alcee “Buckwheat” Hastings (Idiot, Florida) speaks “white” when addressing the press or a predominantly white audience. Then he speaks like a jive-ass mo-fo when addressing his constituents. I’ve seen it happen. You can also hear it on the phone taps that were used to impeach and convict him as a disgraced federal judge (yet he’s re-elected without serious opposition).
Mayor Marion Barry did what Hastings does in Washington, DC. Talk white or black according to the audience.
I seem to recall that Mayor Fiorello LaGuardia, NY City, was famous for being able to talk, Italian, Jewish and White as needed.