code: def GetConsoleScreenBufferInfo(stream_id=STDOUT):
      
      handle = handles[stream_id]
      csbi = CONSOLE_SCREEN_BUFFER_INFO()
      success = windll.kernel32.GetConsoleScreenBufferInfo(
          handle, byref(csbi))
      if not success:
          raise WinError()
      return csbi
docs: Get console screen buffer info object.