(session, db_kb: 'DbKnowledgeBase', kb: 'KnowledgeBase')
return manager
:param session:
        :param db_kb:
        :param kb:
        :return:                        A loaded structured code manager
def load(session, db_kb: 'DbKnowledgeBase', kb: 'KnowledgeBase') -> StructuredCodeManager:
        """

        :param session:
        :param db_kb:
        :param kb:
        :return:                        A loaded structured code manager
        """

        manager = StructuredCodeManager(kb)

        db_code_collection = session.query(DbStructuredCode).filter_by(kb=db_kb)

        for db_code in db_code_collection:
            if not db_code.expr_comments:
                expr_comments = None
            else:
                expr_comments = json.loads(db_code.expr_comments.decode("utf-8"))
                expr_comments = StructuredCodeManagerSerializer.dict_strkey_to_intkey(expr_comments)

            if not db_code.stmt_comments:
                stmt_comments = None
            else:
                stmt_comments = json.loads(db_code.stmt_comments.decode("utf-8"))
                stmt_comments = StructuredCodeManagerSerializer.dict_strkey_to_intkey(stmt_comments)
            configuration = None
            dummy_codegen = DummyStructuredCodeGenerator(db_code.flavor,
                                                         expr_comments=expr_comments,
                                                         stmt_comments=stmt_comments,
                                                         configuration=configuration,
                                                         )
            cache = DecompilationCache()
            cache.codegen = dummy_codegen
            manager[(db_code.func_addr, db_code.flavor)] = cache

        return manager
def load ( session , db_kb : 'DbKnowledgeBase' , kb : 'KnowledgeBase' ) -> StructuredCodeManager : manager = StructuredCodeManager ( kb ) db_code_collection = session . query ( DbStructuredCode ) . filter_by ( kb = db_kb ) for db_code in db_code_collection : if not db_code . expr_comments : expr_comments = None else : expr_comments = json . loads ( db_code . expr_comments . decode ( "utf-8" ) ) expr_comments = StructuredCodeManagerSerializer . dict_strkey_to_intkey ( expr_comments ) if not db_code . stmt_comments : stmt_comments = None else : stmt_comments = json . loads ( db_code . stmt_comments . decode ( "utf-8" ) ) stmt_comments = StructuredCodeManagerSerializer . dict_strkey_to_intkey ( stmt_comments ) configuration = None dummy_codegen = DummyStructuredCodeGenerator ( db_code . flavor , expr_comments = expr_comments , stmt_comments = stmt_comments , configuration = configuration , ) cache = DecompilationCache ( ) cache . codegen = dummy_codegen manager [ ( db_code . func_addr , db_code . flavor ) ] = cache return manager