def_normalize_key(self,item):iftype(item)isnottuple:raiseTypeError("Structured code can only be queried by tuples of (func, flavor)")iftype(item[0])isstr:item=(self._kb.labels.lookup(item[0]),*item[1:])returnitemdef__getitem__(self,item)->"DecompilationCache":returnself.cached[self._normalize_key(item)]def__setitem__(self,key,value:Union["DecompilationCache","BaseStructuredCodeGenerator"]):from...analyses.decompiler.structured_codegenimportBaseStructuredCodeGeneratorfrom...analyses.decompiler.decompilation_cacheimportDecompilationCachenkey=self._normalize_key(key)ifisinstance(value,BaseStructuredCodeGenerator):cache=DecompilationCache(nkey)cache.codegen=valueelse:cache=valueself.cached[nkey]=cachedef__contains__(self,key):returnself._normalize_key(key)inself.cacheddef__delitem__(self,key):delself.cached[self._normalize_key(key)]