s4-python: add some helper for converting ldb_flag to text