CZML Quaternion transformation

Hi there,

I want to use Python to develop the transformation module for my application (from .xml to .czml). However, I’m stuck on the Quaternion transformation part.
CesiumJS provides the function Transforms.headingPitchRollQuaternion(center, hpr) to correctly translate the Quaternion from longitude, latitude, and HPR (heading, pitch, roll). How can I perform this transformation using Python? It seems that it’s not just converting Euler angles to Quaternion, but also considering the longitude and latitude. Does anyone have relevant experience?
Please help me. Thank you!