def METHOD_NAME(self, index):
    """
    Slot that handles requests to open tool windows.
    """
    index = self.controlToBeCreated(index)
    if index >= 0:
        if index == WMS:
            # Open a WMS control widget.
            title = "Web Service Plot Control"
            widget = wms.LSecWMSControlWidget(
                default_WMS=config_loader(dataset="default_LSEC_WMS"),
                waypoints_model=self.waypoints_model,
                view=self.mpl.canvas,
                wms_cache=config_loader(dataset="wms_cache"))
            self.mpl.canvas.waypoints_interactor.signal_get_lsec.connect(widget.call_get_lsec)
        else:
            raise IndexError("invalid control index")
        # Create the actual dock widget containing <widget>.
        self.createDockWidget(index, title, widget)