def METHOD_NAME(self):
    # Attach command function to specified buttons
    # Left mouse button
    if DGG.LMB in self['commandButtons']:
        self.guiItem.addClickButton(MouseButton.one())
        self.bind(DGG.B1CLICK, self.commandFunc)
    else:
        self.unbind(DGG.B1CLICK)
        self.guiItem.removeClickButton(MouseButton.one())
    # Middle mouse button
    if DGG.MMB in self['commandButtons']:
        self.guiItem.addClickButton(MouseButton.two())
        self.bind(DGG.B2CLICK, self.commandFunc)
    else:
        self.unbind(DGG.B2CLICK)
        self.guiItem.removeClickButton(MouseButton.two())
    # Right mouse button
    if DGG.RMB in self['commandButtons']:
        self.guiItem.addClickButton(MouseButton.three())
        self.bind(DGG.B3CLICK, self.commandFunc)
    else:
        self.unbind(DGG.B3CLICK)
        self.guiItem.removeClickButton(MouseButton.three())