def METHOD_NAME(self, event):
    plot = self.component
    index = plot.map_index((event.x, event.y), threshold=self.threshold)
    already_selected = False
    for name in ("index", "value"):
        if not hasattr(plot, name):
            continue
        md = getattr(plot, name).metadata
        if md is None or self.selection_metadata_name not in md:
            continue
        if index in md[self.selection_metadata_name]:
            already_selected = True
            break
    return already_selected, (index is not None)