code: def insert(self, index, chars, tags=None):
      is_single_line = "\n" not in chars
      if is_single_line:
          before_displaylines = get_displaylines(self, index)
  
      self.delegate.insert(index, chars, tags)
  
      if is_single_line:
          after_displaylines = get_displaylines(self, index)
          if after_displaylines == before_displaylines:
              return  # no need to update the sidebar
  
      self.callback()
  
imports: import contextlib
  import functools
  import itertools
  import tkinter
  from tkinter.font import Font
  from idlelib.config import idleConf
  from idlelib.delegator import Delegator
  from idlelib import macosx
label_desc: Use image node_id 2 for calling the WrappedLineHeightChangeDelegator obj's underlying member method code with example usage: obj.insert(index, chars, tags) without return types