Check if the session has been deleted before releasing a callable.
Check if the session has been deleted before releasing a callable.

In some versions of Python, the Session._session field may be cleared
(in `Session.__del__()`) before a callable that has a reference to
that Session is deleted. Add a defensive check in the
`Session._Callable.__del__()` method.

PiperOrigin-RevId: 192679796

DavidNorman/tensorflow,aselle/tensorflow,adit-chandra/tensorflow,dancingdan/tensorflow,dongjoon-hyun/tensorflow,apark263/tensorflow,arborh/tensorflow,nburn42/tensorflow,ppwwyyxx/tensorflow,AnishShah/tensorflow,alsrgv/tensorflow,yanchen036/tensorflow,eaplatanios/tensorflow,lukeiwanski/tensorflow,petewarden/tensorflow,alshedivat/tensorflow,Intel-tensorflow/tensorflow,brchiu/tensorflow,Intel-Corporation/tensorflow,apark263/tensorflow,gautam1858/tensorflow,benoitsteiner/tensorflow-xsmm,aselle/tensorflow,jhseu/tensorflow,seanli9jan/tensorflow,Intel-Corporation/tensorflow,Bismarrck/tensorflow,AnishShah/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,aam-at/tensorflow,karllessard/tensorflow,yongtang/tensorflow,girving/tensorflow,girving/tensorflow,davidzchen/tensorflow,jbedorf/tensorflow,meteorcloudy/tensorflow,arborh/tensorflow,brchiu/tensorflow,nburn42/tensorflow,Intel-tensorflow/tensorflow,jbedorf/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,asimshankar/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,seanli9jan/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,aldian/tensorflow,aldian/tensorflow,karllessard/tensorflow,alshedivat/tensorflow,yongtang/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,snnn/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,hfp/tensorflow-xsmm,DavidNorman/tensorflow,annarev/tensorflow,xzturn/tensorflow,sarvex/tensorflow,petewarden/tensorflow,snnn/tensorflow,dendisuhubdy/tensorflow,Bismarrck/tensorflow,dendisuhubdy/tensorflow,aselle/tensorflow,drpngx/tensorflow,tensorflow/tensorflow,benoitsteiner/tensorflow-xsmm,jendap/tensorflow,manipopopo/tensorflow,gunan/tensorflow,girving/tensorflow,nburn42/tensorflow,kobejean/tensorflow,girving/tensorflow,alshedivat/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,dendisuhubdy/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,ZhangXinNan/tensorflow,adit-chandra/tensorflow,ageron/tensorflow,adit-chandra/tensorflow,manipopopo/tensorflow,paolodedios/tensorflow,jbedorf/tensorflow,brchiu/tensorflow,kobejean/tensorflow,seanli9jan/tensorflow,aam-at/tensorflow,manipopopo/tensorflow,adit-chandra/tensorflow,hfp/tensorflow-xsmm,theflofly/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,alshedivat/tensorflow,annarev/tensorflow,gunan/tensorflow,AnishShah/tensorflow,lukeiwanski/tensorflow,DavidNorman/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,ageron/tensorflow,snnn/tensorflow,karllessard/tensorflow,ZhangXinNan/tensorflow,aselle/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,ppwwyyxx/tensorflow,Intel-tensorflow/tensorflow,jendap/tensorflow,adit-chandra/tensorflow,alsrgv/tensorflow,Bismarrck/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,gojira/tensorflow,eaplatanios/tensorflow,paolodedios/tensorflow,gunan/tensorflow,hfp/tensorflow-xsmm,gautam1858/tensorflow,paolodedios/tensorflow,kobejean/tensorflow,chemelnucfin/tensorflow,ageron/tensorflow,xzturn/tensorflow,dendisuhubdy/tensorflow,dendisuhubdy/tensorflow,Bismarrck/tensorflow,xzturn/tensorflow,dongjoon-hyun/tensorflow,freedomtan/tensorflow,eaplatanios/tensorflow,annarev/tensorflow,aldian/tensorflow,petewarden/tensorflow,renyi533/tensorflow,jbedorf/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow,seanli9jan/tensorflow,meteorcloudy/tensorflow,girving/tensorflow,apark263/tensorflow,cxxgtxy/tensorflow,apark263/tensorflow,jbedorf/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,nburn42/tensorflow,aselle/tensorflow,girving/tensorflow,davidzchen/tensorflow,caisq/tensorflow,dendisuhubdy/tensorflow,brchiu/tensorflow,asimshankar/tensorflow,ppwwyyxx/tensorflow,ZhangXinNan/tensorflow,dendisuhubdy/tensorflow,hfp/tensorflow-xsmm,davidzchen/tensorflow,lukeiwanski/tensorflow,lukeiwanski/tensorflow,jbedorf/tensorflow,davidzchen/tensorflow,nburn42/tensorflow,jalexvig/tensorflow,lukeiwanski/tensorflow,arborh/tensorflow,frreiss/tensorflow-fred,DavidNorman/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,chemelnucfin/tensorflow,yanchen036/tensorflow,eaplatanios/tensorflow,adit-chandra/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,meteorcloudy/tensorflow,AnishShah/tensorflow,hehongliang/tensorflow,drpngx/tensorflow,benoitsteiner/tensorflow-xsmm,annarev/tensorflow,jart/tensorflow,jalexvig/tensorflow,jart/tensorflow,tensorflow/tensorflow-pywrap_saved_model,theflofly/tensorflow,sarvex/tensorflow,jalexvig/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aselle/tensorflow,petewarden/tensorflow,chemelnucfin/tensorflow,eaplatanios/tensorflow,jbedorf/tensorflow,karllessard/tensorflow,alshedivat/tensorflow,caisq/tensorflow,asimshankar/tensorflow,jhseu/tensorflow,drpngx/tensorflow,dancingdan/tensorflow,renyi533/tensorflow,jendap/tensorflow,snnn/tensorflow,dancingdan/tensorflow,girving/tensorflow,adit-chandra/tensorflow,apark263/tensorflow,gunan/tensorflow,girving/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,freedomtan/tensorflow,asimshankar/tensorflow,renyi533/tensorflow,benoitsteiner/tensorflow-xsmm,dancingdan/tensorflow,jhseu/tensorflow,Bismarrck/tensorflow,jart/tensorflow,chemelnucfin/tensorflow,jalexvig/tensorflow,seanli9jan/tensorflow,eaplatanios/tensorflow,yongtang/tensorflow,xodus7/tensorflow,theflofly/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow,jhseu/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,dancingdan/tensorflow,petewarden/tensorflow,aselle/tensorflow,hfp/tensorflow-xsmm,caisq/tensorflow,jendap/tensorflow,hfp/tensorflow-xsmm,freedomtan/tensorflow,caisq/tensorflow,yongtang/tensorflow,jbedorf/tensorflow,xodus7/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,alshedivat/tensorflow,adit-chandra/tensorflow,kobejean/tensorflow,cxxgtxy/tensorflow,drpngx/tensorflow,kevin-coder/tensorflow-fork,ppwwyyxx/tensorflow,benoitsteiner/tensorflow-xsmm,arborh/tensorflow,DavidNorman/tensorflow,yanchen036/tensorflow,dendisuhubdy/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,seanli9jan/tensorflow,theflofly/tensorflow,freedomtan/tensorflow,aselle/tensorflow,theflofly/tensorflow,kobejean/tensorflow,karllessard/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,kevin-coder/tensorflow-fork,annarev/tensorflow,alsrgv/tensorflow,petewarden/tensorflow,manipopopo/tensorflow,xodus7/tensorflow,xodus7/tensorflow,asimshankar/tensorflow,manipopopo/tensorflow,frreiss/tensorflow-fred,manipopopo/tensorflow,jalexvig/tensorflow,aam-at/tensorflow,jbedorf/tensorflow,ppwwyyxx/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,xodus7/tensorflow,jalexvig/tensorflow,alsrgv/tensorflow,AnishShah/tensorflow,DavidNorman/tensorflow,caisq/tensorflow,jendap/tensorflow,snnn/tensorflow,drpngx/tensorflow,nburn42/tensorflow,ghchinoy/tensorflow,aldian/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,xodus7/tensorflow,petewarden/tensorflow,jendap/tensorflow,theflofly/tensorflow,manipopopo/tensorflow,jbedorf/tensorflow,arborh/tensorflow,girving/tensorflow,gojira/tensorflow,AnishShah/tensorflow,hfp/tensorflow-xsmm,meteorcloudy/tensorflow,snnn/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,lukeiwanski/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,apark263/tensorflow,brchiu/tensorflow,gojira/tensorflow,apark263/tensorflow,DavidNorman/tensorflow,DavidNorman/tensorflow,aldian/tensorflow,tensorflow/tensorflow,lukeiwanski/tensorflow,chemelnucfin/tensorflow,snnn/tensorflow,alsrgv/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,paolodedios/tensorflow,Bismarrck/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,snnn/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,sarvex/tensorflow,dendisuhubdy/tensorflow,ageron/tensorflow,gautam1858/tensorflow,hehongliang/tensorflow,kevin-coder/tensorflow-fork,brchiu/tensorflow,gojira/tensorflow,jhseu/tensorflow,manipopopo/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,chemelnucfin/tensorflow,hehongliang/tensorflow,arborh/tensorflow,ZhangXinNan/tensorflow,paolodedios/tensorflow,nburn42/tensorflow,dancingdan/tensorflow,theflofly/tensorflow,alsrgv/tensorflow,lukeiwanski/tensorflow,yongtang/tensorflow,hehongliang/tensorflow,kevin-coder/tensorflow-fork,xzturn/tensorflow,drpngx/tensorflow,xodus7/tensorflow,xzturn/tensorflow,yanchen036/tensorflow,dongjoon-hyun/tensorflow,caisq/tensorflow,xodus7/tensorflow,tensorflow/tensorflow,xodus7/tensorflow,gojira/tensorflow,petewarden/tensorflow,apark263/tensorflow,kobejean/tensorflow,eaplatanios/tensorflow,renyi533/tensorflow,ghchinoy/tensorflow,jalexvig/tensorflow,asimshankar/tensorflow,dongjoon-hyun/tensorflow,Intel-tensorflow/tensorflow,gojira/tensorflow,dancingdan/tensorflow,ppwwyyxx/tensorflow,ZhangXinNan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ghchinoy/tensorflow,renyi533/tensorflow,kobejean/tensorflow,eaplatanios/tensorflow,aam-at/tensorflow,dancingdan/tensorflow,brchiu/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,kobejean/tensorflow,asimshankar/tensorflow,kevin-coder/tensorflow-fork,ZhangXinNan/tensorflow,jalexvig/tensorflow,Bismarrck/tensorflow,nburn42/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,kevin-coder/tensorflow-fork,manipopopo/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,adit-chandra/tensorflow,asimshankar/tensorflow,dancingdan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,caisq/tensorflow,jbedorf/tensorflow,hehongliang/tensorflow,hfp/tensorflow-xsmm,gojira/tensorflow,ZhangXinNan/tensorflow,DavidNorman/tensorflow,snnn/tensorflow,arborh/tensorflow,alshedivat/tensorflow,meteorcloudy/tensorflow,jalexvig/tensorflow,dongjoon-hyun/tensorflow,jendap/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,snnn/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,apark263/tensorflow,dongjoon-hyun/tensorflow,tensorflow/tensorflow,xzturn/tensorflow,ghchinoy/tensorflow,alsrgv/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow,alshedivat/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ageron/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,gautam1858/tensorflow,benoitsteiner/tensorflow-xsmm,tensorflow/tensorflow-experimental_link_static_libraries_once,dongjoon-hyun/tensorflow,hfp/tensorflow-xsmm,gunan/tensorflow,asimshankar/tensorflow,karllessard/tensorflow,renyi533/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,nburn42/tensorflow,girving/tensorflow,gunan/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,seanli9jan/tensorflow,kevin-coder/tensorflow-fork,ghchinoy/tensorflow,jendap/tensorflow,lukeiwanski/tensorflow,tensorflow/tensorflow-pywrap_saved_model,meteorcloudy/tensorflow,alsrgv/tensorflow,aselle/tensorflow,chemelnucfin/tensorflow,AnishShah/tensorflow,brchiu/tensorflow,frreiss/tensorflow-fred,caisq/tensorflow,ZhangXinNan/tensorflow,alsrgv/tensorflow,sarvex/tensorflow,brchiu/tensorflow,ghchinoy/tensorflow,gunan/tensorflow,caisq/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,theflofly/tensorflow,kevin-coder/tensorflow-fork,ghchinoy/tensorflow,kevin-coder/tensorflow-fork,tensorflow/tensorflow-experimental_link_static_libraries_once,eaplatanios/tensorflow,brchiu/tensorflow,AnishShah/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,aldian/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,cxxgtxy/tensorflow,aselle/tensorflow,manipopopo/tensorflow,yongtang/tensorflow,ZhangXinNan/tensorflow,jalexvig/tensorflow,jart/tensorflow,gunan/tensorflow,aselle/tensorflow,kobejean/tensorflow,jart/tensorflow,alsrgv/tensorflow,alsrgv/tensorflow,jbedorf/tensorflow,chemelnucfin/tensorflow,AnishShah/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,dongjoon-hyun/tensorflow,adit-chandra/tensorflow,hfp/tensorflow-xsmm,jhseu/tensorflow,jart/tensorflow,benoitsteiner/tensorflow-xsmm,lukeiwanski/tensorflow,theflofly/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,drpngx/tensorflow,cxxgtxy/tensorflow,dancingdan/tensorflow,Intel-tensorflow/tensorflow,Bismarrck/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,dendisuhubdy/tensorflow,gojira/tensorflow,drpngx/tensorflow,xodus7/tensorflow,arborh/tensorflow,jhseu/tensorflow,alshedivat/tensorflow,jalexvig/tensorflow,annarev/tensorflow,dongjoon-hyun/tensorflow,theflofly/tensorflow,brchiu/tensorflow,drpngx/tensorflow,girving/tensorflow,ageron/tensorflow,eaplatanios/tensorflow,alsrgv/tensorflow,meteorcloudy/tensorflow,ageron/tensorflow,arborh/tensorflow,karllessard/tensorflow,renyi533/tensorflow,nburn42/tensorflow,aldian/tensorflow,jhseu/tensorflow,ghchinoy/tensorflow,chemelnucfin/tensorflow,meteorcloudy/tensorflow,yanchen036/tensorflow,petewarden/tensorflow,asimshankar/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,apark263/tensorflow,yongtang/tensorflow,chemelnucfin/tensorflow,ghchinoy/tensorflow,ppwwyyxx/tensorflow,manipopopo/tensorflow,ghchinoy/tensorflow,jart/tensorflow,ZhangXinNan/tensorflow,gojira/tensorflow,benoitsteiner/tensorflow-xsmm,hfp/tensorflow-xsmm,kevin-coder/tensorflow-fork,drpngx/tensorflow,xzturn/tensorflow,asimshankar/tensorflow,Intel-Corporation/tensorflow,ZhangXinNan/tensorflow,theflofly/tensorflow,AnishShah/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,alshedivat/tensorflow,meteorcloudy/tensorflow,benoitsteiner/tensorflow-xsmm,benoitsteiner/tensorflow-xsmm,annarev/tensorflow,annarev/tensorflow,kobejean/tensorflow,chemelnucfin/tensorflow,xodus7/tensorflow,gunan/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,jart/tensorflow,xzturn/tensorflow,jendap/tensorflow,aam-at/tensorflow,caisq/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,meteorcloudy/tensorflow,arborh/tensorflow,renyi533/tensorflow,seanli9jan/tensorflow,seanli9jan/tensorflow,hehongliang/tensorflow,seanli9jan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,jart/tensorflow,cxxgtxy/tensorflow,theflofly/tensorflow,apark263/tensorflow,ageron/tensorflow,gunan/tensorflow,dongjoon-hyun/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,yanchen036/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,dancingdan/tensorflow,adit-chandra/tensorflow,freedomtan/tensorflow,gojira/tensorflow,dongjoon-hyun/tensorflow,yanchen036/tensorflow,gojira/tensorflow,davidzchen/tensorflow,jhseu/tensorflow,jendap/tensorflow,aam-at/tensorflow,Intel-Corporation/tensorflow,sarvex/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,seanli9jan/tensorflow,AnishShah/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,eaplatanios/tensorflow,ageron/tensorflow,Bismarrck/tensorflow,arborh/tensorflow,snnn/tensorflow,jart/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,kobejean/tensorflow,jendap/tensorflow,yanchen036/tensorflow,tensorflow/tensorflow,ageron/tensorflow,nburn42/tensorflow,Bismarrck/tensorflow,ppwwyyxx/tensorflow,aldian/tensorflow,kevin-coder/tensorflow-fork,Bismarrck/tensorflow,benoitsteiner/tensorflow-xsmm,xzturn/tensorflow,hehongliang/tensorflow,alshedivat/tensorflow,ghchinoy/tensorflow,renyi533/tensorflow