def METHOD_NAME(
    painter,
    option,
    text='button',
    pressed=True,
    bgcolor=None,
    fgcolor=None,
    clicked=None,
    button=None,
    view=None,
):
    # http://www.qtcentre.org/archive/index.php/t-31029.html
    opt = QtWidgets.QStyleOptionButton()
    opt.text = text
    opt.rect = option.rect
    opt.palette = option.palette
    if pressed:
        opt.state = QtWidgets.QStyle.State_Enabled | QtWidgets.QStyle.State_Sunken
    else:
        opt.state = QtWidgets.QStyle.State_Enabled | QtWidgets.QStyle.State_Raised
    # style = QtGui.Q Application.style()
    style = button.style()
    style.drawControl(QtWidgets.QStyle.CE_PushButton, opt, painter, button)