Is "to take" in Swahili used like the English "have", the French "prendre" and the Spanish "tomar"?
Not really. In this case it means they take (grab) the coffee. You "drink" (kunywa) coffee in swahili.
The irony is that in Kenyan/Tanzanian English, they usually use "to take" in that context.
This is very interesting. Zambian and Nigerian English also use "to take" like this. Because it was in this lesson, I would have thought that use came from the local language, but based on dsimonds info, it sounds like not. Perhaps it is old British English that was incorporated in its colonies.
Do the British use the the term "to take" with beverages? Since East Africa spent a few generations under colonial rule, perhaps this term entered usage at that time.
I agree with @Anna662726. I might take sugar in my coffee but I wouldn't take coffee.
We could take hard drugs or take our medicine, but we just drink (or have) coffee.
If you wanted to be humorously old-fashioned or literary you might use the word partake:
"I had indeed partaken of this beverage over the years."