Use nest.map_structure_up_to and nest.flatten_up_to directly.
Use nest.map_structure_up_to and nest.flatten_up_to directly.

PiperOrigin-RevId: 234736064

jhseu/tensorflow,karllessard/tensorflow,ppwwyyxx/tensorflow,theflofly/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,sarvex/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,renyi533/tensorflow,gunan/tensorflow,paolodedios/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,Intel-Corporation/tensorflow,xzturn/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,annarev/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,renyi533/tensorflow,ppwwyyxx/tensorflow,paolodedios/tensorflow,ppwwyyxx/tensorflow,annarev/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,ghchinoy/tensorflow,kevin-coder/tensorflow-fork,davidzchen/tensorflow,karllessard/tensorflow,gunan/tensorflow,DavidNorman/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,ghchinoy/tensorflow,freedomtan/tensorflow,jbedorf/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,Intel-Corporation/tensorflow,jbedorf/tensorflow,ppwwyyxx/tensorflow,jbedorf/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ageron/tensorflow,cxxgtxy/tensorflow,kevin-coder/tensorflow-fork,annarev/tensorflow,freedomtan/tensorflow,alsrgv/tensorflow,yongtang/tensorflow,renyi533/tensorflow,ageron/tensorflow,xzturn/tensorflow,alsrgv/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,sarvex/tensorflow,arborh/tensorflow,tensorflow/tensorflow-pywrap_saved_model,cxxgtxy/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,gunan/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,gunan/tensorflow,sarvex/tensorflow,xzturn/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,kevin-coder/tensorflow-fork,theflofly/tensorflow,tensorflow/tensorflow-pywrap_saved_model,xzturn/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,chemelnucfin/tensorflow,ppwwyyxx/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,arborh/tensorflow,jbedorf/tensorflow,alsrgv/tensorflow,jbedorf/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,aldian/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,theflofly/tensorflow,ppwwyyxx/tensorflow,arborh/tensorflow,theflofly/tensorflow,theflofly/tensorflow,freedomtan/tensorflow,aldian/tensorflow,yongtang/tensorflow,chemelnucfin/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,adit-chandra/tensorflow,freedomtan/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,aldian/tensorflow,ageron/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,alsrgv/tensorflow,petewarden/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,theflofly/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow,jbedorf/tensorflow,ppwwyyxx/tensorflow,aam-at/tensorflow,DavidNorman/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,renyi533/tensorflow,sarvex/tensorflow,davidzchen/tensorflow,sarvex/tensorflow,ghchinoy/tensorflow,petewarden/tensorflow,yongtang/tensorflow,chemelnucfin/tensorflow,arborh/tensorflow,chemelnucfin/tensorflow,Intel-tensorflow/tensorflow,ghchinoy/tensorflow,arborh/tensorflow,DavidNorman/tensorflow,theflofly/tensorflow,frreiss/tensorflow-fred,xzturn/tensorflow,jbedorf/tensorflow,ppwwyyxx/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,ghchinoy/tensorflow,davidzchen/tensorflow,gunan/tensorflow,freedomtan/tensorflow,chemelnucfin/tensorflow,gautam1858/tensorflow,renyi533/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,kevin-coder/tensorflow-fork,jhseu/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,ageron/tensorflow,paolodedios/tensorflow,aldian/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,karllessard/tensorflow,kevin-coder/tensorflow-fork,kevin-coder/tensorflow-fork,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,cxxgtxy/tensorflow,arborh/tensorflow,kevin-coder/tensorflow-fork,arborh/tensorflow,yongtang/tensorflow,ageron/tensorflow,karllessard/tensorflow,alsrgv/tensorflow,karllessard/tensorflow,ghchinoy/tensorflow,jbedorf/tensorflow,gautam1858/tensorflow,DavidNorman/tensorflow,arborh/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,karllessard/tensorflow,kevin-coder/tensorflow-fork,jhseu/tensorflow,freedomtan/tensorflow,Intel-Corporation/tensorflow,ageron/tensorflow,arborh/tensorflow,petewarden/tensorflow,DavidNorman/tensorflow,renyi533/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,xzturn/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,aldian/tensorflow,aam-at/tensorflow,karllessard/tensorflow,adit-chandra/tensorflow,renyi533/tensorflow,jhseu/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,chemelnucfin/tensorflow,xzturn/tensorflow,jbedorf/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,xzturn/tensorflow,arborh/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,ageron/tensorflow,alsrgv/tensorflow,jhseu/tensorflow,davidzchen/tensorflow,jbedorf/tensorflow,alsrgv/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,adit-chandra/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,aldian/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,ageron/tensorflow,davidzchen/tensorflow,ghchinoy/tensorflow,kevin-coder/tensorflow-fork,sarvex/tensorflow,yongtang/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,theflofly/tensorflow,karllessard/tensorflow,ageron/tensorflow,aam-at/tensorflow,adit-chandra/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,gunan/tensorflow,theflofly/tensorflow,jhseu/tensorflow,tensorflow/tensorflow,kevin-coder/tensorflow-fork,ppwwyyxx/tensorflow,DavidNorman/tensorflow,aam-at/tensorflow,DavidNorman/tensorflow,Intel-tensorflow/tensorflow,DavidNorman/tensorflow,petewarden/tensorflow,theflofly/tensorflow,renyi533/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,ghchinoy/tensorflow,alsrgv/tensorflow,jbedorf/tensorflow,jhseu/tensorflow,freedomtan/tensorflow,ageron/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,ageron/tensorflow,aldian/tensorflow,ageron/tensorflow,xzturn/tensorflow,arborh/tensorflow,aam-at/tensorflow,alsrgv/tensorflow,frreiss/tensorflow-fred,ghchinoy/tensorflow,xzturn/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,yongtang/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,gautam1858/tensorflow,jbedorf/tensorflow,adit-chandra/tensorflow,frreiss/tensorflow-fred,renyi533/tensorflow,Intel-tensorflow/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,ghchinoy/tensorflow,alsrgv/tensorflow,ppwwyyxx/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,renyi533/tensorflow,renyi533/tensorflow,ghchinoy/tensorflow,petewarden/tensorflow,petewarden/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,jhseu/tensorflow,theflofly/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,gunan/tensorflow,freedomtan/tensorflow,annarev/tensorflow,annarev/tensorflow,kevin-coder/tensorflow-fork,davidzchen/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,alsrgv/tensorflow,sarvex/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,aldian/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,freedomtan/tensorflow,frreiss/tensorflow-fred,jhseu/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,aam-at/tensorflow,DavidNorman/tensorflow,davidzchen/tensorflow,adit-chandra/tensorflow