Add a helper method to encapsulate the common logic of defining a tf.function in lingvo.
Add a helper method to encapsulate the common logic of defining a tf.function in lingvo.

PiperOrigin-RevId: 327758590

tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo