class_docstr: Implements a 'write()' method which, on Windows, will strip ANSI character
  sequences from the text, and if outputting to a tty, will convert them into
  win32 function calls.
code: def convert_osc(self, text):
      for match in self.ANSI_OSC_RE.finditer(text):
          start, end = match.span()
          text = text[:start] + text[end:]
          paramstring, command = match.groups()
          if command == BEL:
              if paramstring.count(";") == 1:
                  params = paramstring.split(";")
                  # 0 - change title and icon (we will only change title)
                  # 1 - change icon (we don't support this)
                  # 2 - change title
                  if params[0] in "02":
                      winterm.set_title(params[1])
      return text
  
imports: import re
  import sys
  import os
  from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style, BEL
  from .winterm import enable_vt_processing, WinTerm, WinColor, WinStyle
  from .win32 import windll, winapi_test
label_desc: Use image node_id 11 for calling the AnsiToWin32 obj's underlying member method code with example usage: obj.convert_osc(text) and returns: text