[automerge] Export the code to fix b/218977698 2p: c70f00ec74

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/libtextclassifier/+/20425370

Change-Id: I2b062255bbe097d8e2c81aa6a6172c68487ec6df