AttributeError: module 'tensorflow.python.framework.graph_util' during generating a model

I’m new at this.
During Generate a TensorFlow Model for Inference I received the following error.
AttributeError: module ‘tensorflow.python.framework.graph_util’ has no attribute ‘convert_variables_to_constants’

It looks like an error in TensorFlow. Is it? How do I correct it so I can continue?

Here’s the code
!rm -rf {SAVED_MODEL}
!python tensorflow/tensorflow/examples/speech_commands/freeze.py
–wanted_words=$WANTED_WORDS
–window_stride_ms=$WINDOW_STRIDE
–preprocess=$PREPROCESS
–model_architecture=$MODEL_ARCHITECTURE
–start_checkpoint=$TRAIN_DIR$MODEL_ARCHITECTURE’.ckpt-'{TOTAL_STEPS}
–save_format=saved_model
–output_file={SAVED_MODEL}

Here’s the result:
2024-05-24 15:09:05.749740: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-05-24 15:09:05.749796: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-05-24 15:09:05.751628: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-05-24 15:09:06.769302: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
INFO:tensorflow:Restoring parameters from train/tiny_conv.ckpt-15000
I0524 15:09:08.498864 139710899581568 saver.py:1413] Restoring parameters from train/tiny_conv.ckpt-15000
Traceback (most recent call last):
File “/content/tensorflow/tensorflow/examples/speech_commands/freeze.py”, line 312, in
tf.compat.v1.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File “/usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/app.py”, line 36, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File “/usr/local/lib/python3.10/dist-packages/absl/app.py”, line 308, in run
_run_main(main, args)
File “/usr/local/lib/python3.10/dist-packages/absl/app.py”, line 254, in _run_main
sys.exit(main(argv))
File “/content/tensorflow/tensorflow/examples/speech_commands/freeze.py”, line 234, in main
frozen_graph_def = graph_util.convert_variables_to_constants(
AttributeError: module ‘tensorflow.python.framework.graph_util’ has no attribute ‘convert_variables_to_constants’

Any ideal what’s going on?

Looking for steps to move forward.