def METHOD_NAME(self, painter, option, widget):
    self.auto_switch_mode()
    painter.save()
    painter.setBrush(QtCore.Qt.NoBrush)
    painter.setPen(QtCore.Qt.NoPen)
    margin = 2.0
    rect = self.boundingRect()
    rect = QtCore.QRectF(rect.left() + margin,
                         rect.top() + margin,
                         rect.width() - (margin * 2),
                         rect.height() - (margin * 2))
    text_rect = self._text_item.boundingRect()
    text_rect = QtCore.QRectF(
        rect.center().x() - (text_rect.width() / 2) - 5,
        rect.height() - text_rect.height(),
        text_rect.width() + 10,
        text_rect.height()
    )
    painter.setBrush(QtGui.QColor(255, 255, 255, 20))
    painter.drawRoundedRect(rect, 20, 20)
    painter.setBrush(QtGui.QColor(0, 0, 0, 100))
    painter.drawRoundedRect(text_rect, 3, 3)
    size = int(rect.height() / 4)
    triangle = QtGui.QPolygonF()
    triangle.append(QtCore.QPointF(-size, size))
    triangle.append(QtCore.QPointF(0.0, 0.0))
    triangle.append(QtCore.QPointF(size, size))
    transform = QtGui.QTransform()
    transform.translate(rect.center().x(), rect.y() + (size / 3))
    # transform.rotate(-90)
    poly = transform.map(triangle)
    if self.selected:
        pen = QtGui.QPen(
            QtGui.QColor(*NodeEnum.SELECTED_BORDER_COLOR.value), 1.3
        )
        painter.setBrush(QtGui.QColor(*NodeEnum.SELECTED_COLOR.value))
    else:
        pen = QtGui.QPen(QtGui.QColor(*self.border_color), 1.2)
        painter.setBrush(QtGui.QColor(0, 0, 0, 50))
    pen.setJoinStyle(QtCore.Qt.MiterJoin)
    painter.setPen(pen)
    painter.drawPolygon(poly)
    edge_size = 30
    edge_rect = QtCore.QRectF(rect.center().x() - (edge_size / 2),
                              rect.y() + (size * 1.6),
                              edge_size, 4)
    painter.drawRect(edge_rect)
    painter.restore()