def __init__(self,<EOL>artists,<EOL>*,<EOL>multiple=False,<EOL>highlight=False,<EOL>hover=False,<EOL>bindings=None,<EOL>annotation_kwargs=None,<EOL>annotation_positions=None,<EOL>highlight_kwargs=None):
artists = list(artists)<EOL>self._artists = [weakref.ref(artist) for artist in artists]<EOL>for artist in artists:<EOL><INDENT>type(self)._keep_alive.setdefault(artist, set()).add(self)<EOL><DEDENT>self._multiple = multiple<EOL>self._highlight = highlight<EOL>self._visible = True<EOL>self._enabled = True<EOL>self._selections = []<EOL>self._last_auto_position = None<EOL>self._callbacks = {"<STR_LIT>": [], "<STR_LIT>": []}<EOL>connect_pairs = [("<STR_LIT>", self._on_key_press)]<EOL>if hover:<EOL><INDENT>if multiple:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>connect_pairs += [<EOL>("<STR_LIT>", self._hover_handler),<EOL>("<STR_LIT>", self._hover_handler)]<EOL><DEDENT>else:<EOL><INDENT>connect_pairs += [<EOL>("<STR_LIT>", self._nonhover_handler)]<EOL><DEDENT>self._disconnectors = [<EOL>partial(canvas.mpl_disconnect, canvas.mpl_connect(*pair))<EOL>for pair in connect_pairs<EOL>for canvas in {artist.figure.canvas for artist in artists}]<EOL>bindings = dict(ChainMap(bindings if bindings is not None else {},<EOL>_default_bindings))<EOL>unknown_bindings = set(bindings) - set(_default_bindings)<EOL>if unknown_bindings:<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>"<STR_LIT:U+002CU+0020>".join(sorted(unknown_bindings))))<EOL><DEDENT>duplicate_bindings = [<EOL>k for k, v in Counter(list(bindings.values())).items() if v > <NUM_LIT:1>]<EOL>if duplicate_bindings:<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>"<STR_LIT:U+002CU+0020>".join(sorted(map(str, duplicate_bindings)))))<EOL><DEDENT>self.bindings = bindings<EOL>self.annotation_kwargs = (<EOL>annotation_kwargs if annotation_kwargs is not None<EOL>else copy.deepcopy(_default_annotation_kwargs))<EOL>self.annotation_positions = (<EOL>annotation_positions if annotation_positions is not None<EOL>else copy.deepcopy(_default_annotation_positions))<EOL>self.highlight_kwargs = (<EOL>highlight_kwargs if highlight_kwargs is not None<EOL>else copy.deepcopy(_default_highlight_kwargs))<EOL>
Construct a cursor.

Parameters
----------

artists : List[Artist]
    A list of artists that can be selected by this cursor.

multiple : bool, optional
    Whether multiple artists can be "on" at the same time (defaults to
    False).

highlight : bool, optional
    Whether to also highlight the selected artist.  If so,
    "highlighter" artists will be placed as the first item in the
    :attr:`extras` attribute of the `Selection`.

hover : bool, optional
    Whether to select artists upon hovering instead of by clicking.
    (Hovering over an artist while a button is pressed will not trigger
    a selection; right clicking on an annotation will still remove it.)

bindings : dict, optional
    A mapping of button and keybindings to actions.  Valid entries are:

    ================ ==================================================
    'select'         mouse button to select an artist
                     (default: 1)
    'deselect'       mouse button to deselect an artist
                     (default: 3)
    'left'           move to the previous point in the selected path,
                     or to the left in the selected image
                     (default: shift+left)
    'right'          move to the next point in the selected path, or to
                     the right in the selected image
                     (default: shift+right)
    'up'             move up in the selected image
                     (default: shift+up)
    'down'           move down in the selected image
                     (default: shift+down)
    'toggle_enabled' toggle whether the cursor is active
                     (default: e)
    'toggle_visible' toggle default cursor visibility and apply it to
                     all cursors (default: v)
    ================ ==================================================

    Missing entries will be set to the defaults.  In order to not
    assign any binding to an action, set it to ``None``.

annotation_kwargs : dict, optional
    Keyword argments passed to the `annotate
    <matplotlib.axes.Axes.annotate>` call.

annotation_positions : List[dict], optional
    List of positions tried by the annotation positioning algorithm.

highlight_kwargs : dict, optional
    Keyword arguments used to create a highlighted artist.