[embind] Add #if ASSERTIONS guard around assert calls
#20606
Merged
#if ASSERTIONS guard around assert calls
#20606