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.
docstr: Write the given text to our wrapped stream, stripping any ANSI
  sequences from the text, and optionally converting them into win32
  calls.
docstr_tok: ["Write","the","given","text","to","our","wrapped","stream",",","stripping","any","ANSI","sequences","from","the","text",",","and","optionally","converting","them","into","win32","calls","."]
code: def write_and_convert(self, text):
      """
      Write the given text to our wrapped stream, stripping any ANSI
      sequences from the text, and optionally converting them into win32
      calls.
      """
      cursor = 0
      text = self.convert_osc(text)
      for match in self.ANSI_CSI_RE.finditer(text):
          start, end = match.span()
          self.write_plain_text(text, cursor, start)
          self.convert_ansi(*match.groups())
          cursor = end
      self.write_plain_text(text, cursor, len(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 6 for calling the AnsiToWin32 obj's underlying member method code with example usage: obj.write_and_convert(text) without return types