def add_element(self, name, sname, sclass, size, elem):
        try:
            if elem not in self.D[ name ][ sname ][ sclass ]:
                self.D[ name ][ sname ][ sclass ][ elem ] = size
                self.D[ name ][ sname ][ "SIZE" ] += size

        except KeyError:
            if name not in self.D:
                self.D[ name ] = {}
                self.D[ name ][ sname ] = {}
                self.D[ name ][ sname ][ "SIZE" ] = 0
                self.D[ name ][ sname ][ sclass ] = {}
            elif sname not in self.D[ name ]:
                self.D[ name ][ sname ] = {}
                self.D[ name ][ sname ][ "SIZE" ] = 0
                self.D[ name ][ sname ][ sclass ] = {}
            elif sclass not in self.D[ name ][ sname ]:
                self.D[ name ][ sname ][ sclass ] = {}

            self.D[ name ][ sname ][ "SIZE" ] += size
            self.D[ name ][ sname ][ sclass ][ elem ] = size
dataset/ETHPy150Open androguard/androguard/elsim/elsim/similarity/similarity.py/DBFormat.add_element/original