code: def enable_vt_mode(filehandle=None):
      
  
      if filehandle is None:
          filehandle = msvcrt.get_osfhandle(sys.__stdout__.fileno())
  
      current_mode = wintypes.DWORD()
      KERNEL32.GetConsoleMode(filehandle, ctypes.byref(current_mode))
      new_mode = 0x0004 | current_mode.value
      KERNEL32.SetConsoleMode(filehandle, new_mode)
docs: Enables virtual terminal processing mode for the given console or stdout