Make sure that TensorFlow code can use tf2.enabled() at import time.
Make sure that TensorFlow code can use tf2.enabled() at import time.

Fixes #36700.

PiperOrigin-RevId: 302924977
Change-Id: I22991018941dcb1ad9a862320f1effaa5238218a

paolodedios/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,sarvex/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,annarev/tensorflow,aldian/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,gautam1858/tensorflow,annarev/tensorflow,karllessard/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,cxxgtxy/tensorflow,annarev/tensorflow,gunan/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,aam-at/tensorflow,karllessard/tensorflow,annarev/tensorflow,annarev/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,gunan/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,Intel-Corporation/tensorflow,freedomtan/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,sarvex/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,freedomtan/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,gunan/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,aldian/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,gunan/tensorflow,tensorflow/tensorflow,aldian/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,gunan/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,karllessard/tensorflow,aam-at/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,gunan/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,aldian/tensorflow,gunan/tensorflow,gunan/tensorflow,aam-at/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,petewarden/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,gautam1858/tensorflow,annarev/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,sarvex/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,davidzchen/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,tensorflow/tensorflow,gunan/tensorflow,gautam1858/tensorflow,annarev/tensorflow,gunan/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,frreiss/tensorflow-fred,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,Intel-Corporation/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-Corporation/tensorflow,aldian/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,petewarden/tensorflow,aldian/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,aam-at/tensorflow,yongtang/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,paolodedios/tensorflow