The story is inspired by the legendary Arabian tales of , a 6th-century prince renowned for his wisdom and generosity.