'How do I save a TensorFlow mulit-task recommendation model?

So I followed this tutorial and the model trains just fine (https://www.tensorflow.org/recommenders/examples/multitask?hl=en).
My question is how do i save the trained model so that it can be used for serving? The individual ranking and retrieval model are saved in very different ways:

So how do I combine these two steps?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source