[npo] Improve formats extraction (Closes #3782)