def METHOD_NAME(self, axistool, rangename, type, event):
    plot = axistool.component
    range = getattr(plot, rangename)
    if (type == "down") and ((plot, rangename) not in self.plots_ranges):
        if len(self.plots_ranges) > 0:
            src_plot, src_rangename = self.plots_ranges[0]
            src_range = getattr(src_plot, src_rangename)
            self.link(src_range, plot, rangename)
        self.plots_ranges.append((plot, rangename))
    else:
        if (plot, rangename) in self.plots_ranges:
            if len(self.plots_ranges) > 1:
                self.unlink(plot, rangename)
            self.plots_ranges.remove((plot, rangename))
    return True