Use assert package instead of relying on context.