def METHOD_NAME(self,nb,data=None):
    tab_num = nb.get_current_page()
    tab = nb.get_nth_page(tab_num)
    alloc = tab.get_allocation()
    x, y, w, h = (alloc.x, alloc.y, alloc.width, alloc.height)
    pixbuf = self.svg.get_pixbuf_sub(f'#layer{tab_num}').scale_simple(w-10, h-10, GdkPixbuf.InterpType.BILINEAR)
    im = self.builder.get_object(f'Image{tab_num}')
    im.set_from_pixbuf(pixbuf)
    for c in im.get_parent().get_children():
        if c.get_has_tooltip():
            m = re.findall(r'<!--(\d+),(\d+)-->', c.get_tooltip_markup())
            if len(m) > 0:
                x1 = int(m[0][0]); y1 = int(m[0][1])
                c.set_margin_left(max(0, w * x1/1500))
                c.set_margin_top(max(0, h * y1/1000))