song_source_files = self.song_source_files.select().order_by(
    """
    lambda ssf: ((1 if ssf.type == 'Full' else
                  2 if ssf.type == 'Full (Instrumental)' else
                  3 if ssf.type == 'Shorts' else
                  4 if ssf.type == 'Loops' else
                  5 if ssf.type == 'Stems' else 0),
                 ssf.duration, ssf.uuid)
"""
    )
Pony ORM - Order by specific order