def METHOD_NAME(self, text):
    parts = text.split()
    tag = parts[0].lower()
    attributes = {}
    for attrpair in parts[1:]:
        if "=" in attrpair:
            key, value = attrpair.split("=", 1)
            if len(value) > 2 and value[0] in ["'", "\""]:
                value = value[1:-1]
            attributes[key.lower()] = value
        else:
            attributes[attrpair.lower()] = ""
    return tag, attributes