def METHOD_NAME(self, junk: object = None) -> None:
    self.delete("all")
    first_line = int(self._textwidget.index("@0,0").split(".")[0])
    last_line = int(
        self._textwidget.index(f"@0,{self._textwidget.winfo_height()}").split(".")[0]
    )
    for lineno in range(first_line, last_line + 1):
        # index('@0,y') doesn't work when scrolled a lot to side, but dlineinfo seems to work
        dlineinfo = self._textwidget.dlineinfo(f"{lineno}.0")
        if dlineinfo is None or line_is_elided(self._textwidget, lineno):
            # line not on screen for whatever reason
            continue
        x, y, *junk = dlineinfo
        self.create_text(
            0,
            y,
            text=f" {lineno:<4}",
            anchor="nw",
            font="TkFixedFont",
            fill=self._text_color,
            tags=f"line_{lineno}",
        )
    # Do this in other plugins: linenumbers.bind("<<Updated>>", do_something, add=True)
    self.event_generate("<<Updated>>")