docs: def _define_csbi():
          """Defines structs and populates _WindowsCSBI.CSBI."""
          if _WindowsCSBI.CSBI is not None:
              return
  
          class COORD(ctypes.Structure):
              """Windows COORD structure. http://msdn.microsoft.com/en-us/library/windows/desktop/ms682119"""
              _fields_ = [('X', ctypes.c_short), ('Y', ctypes.c_short)]
  
          class SmallRECT(ctypes.Structure):
              """Windows SMALL_RECT structure. http://msdn.microsoft.com/en-us/library/windows/desktop/ms686311"""
              _fields_ = [('Left', ctypes.c_short), ('Top', ctypes.c_short), ('Right', ctypes.c_short),
                          ('Bottom', ctypes.c_short)]
  
          class ConsoleScreenBufferInfo(ctypes.Structure):
              """Windows CONSOLE_SCREEN_BUFFER_INFO structure.
              http://msdn.microsoft.com/en-us/library/windows/desktop/ms682093
              """
              _fields_ = [
                  ('dwSize', COORD),
                  ('dwCursorPosition', COORD),
                  ('wAttributes', ctypes.wintypes.WORD),
                  ('srWindow', SmallRECT),
                  ('dwMaximumWindowSize', COORD)
              ]
  
          _WindowsCSBI.CSBI = ConsoleScreenBufferInfo