Split out functions that don't depend on TensorFlow into a separate library to avoid opening the TensorFlow library if it's not necessary.