How appropriate it is to buy a small gift to a supervisor?

r/

Hi everyone, assuming the following situation. Person A did an 1-year undergraduate thesis under the supervision of Professor B in a 4-year fairly good university in North America. Person A would like to buy a small gift to Professor B, maybe a book, something like that, not expensive. The timing is not holidays.

How appropriate this would be in reference to the North American academic culture?