What is the function of the library in the narrative?

The Ḥulwān Maqāmah: A Literary Assembly and a Contest of Verse