code: def _findMatchingBracket(self, bracket, qpart, block, columnIndex):
          
          if bracket in self._START_BRACKETS:
              charsGenerator = self._iterateDocumentCharsForward(block, columnIndex + 1)
          else:
              charsGenerator = self._iterateDocumentCharsBackward(block, columnIndex)
  
          depth = 1
          oposite = self._OPOSITE_BRACKET[bracket]
          for block, columnIndex, char in charsGenerator:
              if qpart.isCode(block, columnIndex):
                  if char == oposite:
                      depth -= 1
                      if depth == 0:
                          return block, columnIndex
                  elif char == bracket:
                      depth += 1
          else:
              return None, None
docs: Find matching bracket for the bracket.
          Return (block, columnIndex) or (None, None)
          Raise _TimeoutException, if time is over