def METHOD_NAME(self, btnid, label):
    """
    Adds a button to be shown in the info bar.
    """
    sizer = self.GetSizer()
    assert sizer is not None, "Sizer must be created first"
    # user-added buttons replace the standard close button so remove it if we
    # hadn't done it yet
    if sizer.Detach(self._button):
        self._button.Hide()
    button = wx.Button(self, btnid, label)
    button.SetBackgroundColour(self._background_color)
    button.SetForegroundColour(self._foreground_color)
    if wx.Platform == "__WXMAC__":
        # smaller buttons look better in the(narrow)info bar under OS X
        button.SetWindowVariant(wx.WINDOW_VARIANT_SMALL)
    num_items = self.subSizerButtons.GetItemCount()
    if num_items == 1:
        self.subSizerButtons.Add(button, wx.SizerFlags().Centre().Border())
        self.subSizerButtons.Add(self._button, wx.SizerFlags().Centre().Border())
        self._button.Show()
    else:
        self.subSizerButtons.Insert(
            num_items - 1, button, wx.SizerFlags().Centre().Border()
        )
    if self.IsShown():
        self.UpdateParent()