if sgmllib.endbracket.search(' <').start(0):


    class EndBracketMatch:
        endbracket = re.compile(
            '([^\'"<>]|"[^"]*"(?=>|/|\\s|\\w+=)|\'[^\']*\'(?=>|/|\\s|\\w+=))*(?=[<>])|.*?(?=[<>])'
            )

def search(self, string, index=0):
    self.match = self.endbracket.match(string, index)
if self.match:
    return self

def start(self, n):
    return self.match.end(n)
sgmllib.endbracket = EndBracketMatch()
python conflicts in two external packages