Don't use hasattr to check for attribute existence, it uses getattr internally and can trigger unexpected behavior.
Don't use hasattr to check for attribute existence, it uses getattr internally and can trigger unexpected behavior.

PiperOrigin-RevId: 304021205
Change-Id: Ie0464ecabf777a11c1405a11ea5db7d77c566232

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