The original Magical Negro?
Wiki suggests Sidney Poitier in The Defiant Ones, but I never saw it that way.
Scatman nails the trope in The Shining and Twilight movie. In the 1980's Casablanca TV, he plays Sam, but the role is upgraded from sidekick/NPC to partner to Rick.
Scatman was awesome. Only respect.