👽️ lib._format_impl sync with upstream
#798
Merged
lib._format_impl sync with upstream
#798