What role does the moon play in Li Bai's poems?

Is a friend, but also their own incarnation. When he was lonely, he drank alone and stayed with him. It can be said that the cold and lonely character of the moon is just like himself. The moon accompanies you when you are homesick and when you drink. The moon is his friend, shadow, incarnation, and the person who understands him and accompanies him.