code: def align_twosided_items(
      parent, items, min_spacing=8, left_texts=None, right_texts=None
  ):
      """Find spacing for a list of pairs of text such that the left texts are
      left justified and the right texts (roughly) right justified.
      """
      if right_texts is None:
          right_texts = []
      if left_texts is None:
          left_texts = []
      if items:
          if wx.Platform == "__WXMSW__":
              # ignore minspacing for windows
              for item, left, right in zip(
                  items, left_texts, right_texts
              ):
                  item.SetItemLabel("%s\t%s" % (left, right))
          else:
              # Mac and linux use spaces to align.
              widths = [
                  parent.GetTextExtent(
                      "%s%s%s" % (left, " " * min_spacing, right)
                  )[0]
                  for left, right in zip(left_texts, right_texts)
              ]
              maxwidth = max(widths)
              spacewidth = (
                  parent.GetTextExtent("  ")[0]
                  - parent.GetTextExtent(" ")[0]
              )
              for item, left, right, initial_width in zip(
                  items, left_texts, right_texts, widths
              ):
                  numspaces = int(
                      min_spacing
                      + (maxwidth - initial_width) / spacewidth
                  )
                  item.SetItemLabel(
                      "%s%s%s" % (left, " " * numspaces, right)
                  )
  
imports: import platform
  import wx
label_desc: Use image node_id 1 for calling a global function with example usage: align_twosided_items(parent, items, min_spacing, left_texts, right_texts) without return types