code: def unmatched_brackets_in_line(self, text, closing_brackets_type=None):
          
          if closing_brackets_type is None:
              opening_brackets = self.BRACKETS_LEFT.values()
              closing_brackets = self.BRACKETS_RIGHT.values()
          else:
              closing_brackets = [closing_brackets_type]
              opening_brackets = [{')': '(', '}': '{',
                                   ']': '['}[closing_brackets_type]]
          block = self.editor.textCursor().block()
          line_pos = block.position()
          for pos, char in enumerate(text):
              if char in opening_brackets:
                  match = self.editor.find_brace_match(line_pos+pos, char,
                                                       forward=True)
                  if (match is None) or (match > line_pos+len(text)):
                      return True
              if char in closing_brackets:
                  match = self.editor.find_brace_match(line_pos+pos, char,
                                                       forward=False)
                  if (match is None) or (match < line_pos):
                      return True
          return False
docs: Checks if there is an unmatched brackets in the 'text'.
  
          The brackets type can be general or specified by closing_brackets_type
          (')', ']' or '}')