code: def _windows_get_window_size():
      
      sbi = CONSOLE_SCREEN_BUFFER_INFO()
      ret = windll.kernel32.GetConsoleScreenBufferInfo(console_handle, byref(sbi))
      if ret == 0:
          return (0, 0)
      return (sbi.srWindow.Right - sbi.srWindow.Left + 1,
              sbi.srWindow.Bottom - sbi.srWindow.Top + 1)
docs: Return (width, height) of available window area on Windows.
         (0, 0) if no console is allocated.