I have just struggled with this same issue. As of Feb. 26th, 2025, TensorFlow is in version 2.18.0. To call the method in this question your valid import will be:
from tensorflow.python.keras.utils import layer_utils
And then:
...
layer_utils.convert_all_kernels_in_model(model)