docs: def SCIGetStyledText(self, selectionPos: tuple):
          """
          Pythonic wrapper for the SCI_GETSTYLEDTEXT command.
  
          For example, to get the raw text and styling bits
          for the first five characters in the widget use::
  
              text, style = SCIGetStyledText((0, 0, 0, 5))
              print(text.decode('utf-8'))
  
          |Args|
  
          * ``selectionPos`` (**tuple**): selection position in the
            form of (start_line, start_col, end_line, end_col).
  
          |Returns|
  
          **tuple** of two ``bytearrays``. The first contains the
            the character bytes and the second the Scintilla styling
            information.
  
          |Raises|
  
          * **QtmacsArgumentError** if at least one argument has an invalid type.
          """
  
          # Sanity check.
          if not self.isSelectionPositionValid(selectionPos):
              return None
  
          # Convert the start- and end point of the selection into
          # stream offsets. Ensure that start comes before end.
          start = self.positionFromLineIndex(*selectionPos[:2])
          end = self.positionFromLineIndex(*selectionPos[2:])
          if start > end:
              start, end = end, start
  
          # Allocate a large enough buffer.
          bufSize = 2 * (end - start) + 2
          buf = bytearray(bufSize)
  
          # Fetch the text- and styling information.
          numRet = self.SendScintilla(self.SCI_GETSTYLEDTEXT, start, end, buf)
  
          # The last two bytes are always Zero according to the
          # Scintilla documentation, so remove them.
          buf = buf[:-2]
  
          # Double check that we did not receive more bytes than the buffer
          # was long.
          if numRet > bufSize:
              qteMain.qteLogger.error('SCI_GETSTYLEDTEX function returned more'
                                      ' bytes than expected.')
          text = buf[0::2]
          style = buf[1::2]
          return (text, style)