def _register_scatter():
@functools.wraps(PathCollection.__init__)<EOL>def __init__(self, *args, **kwargs):<EOL><INDENT>_nonscatter_pathcollections.add(self)<EOL>return __init__.__wrapped__(self, *args, **kwargs)<EOL><DEDENT>PathCollection.__init__ = __init__<EOL>@functools.wraps(Axes.scatter)<EOL>def scatter(*args, **kwargs):<EOL><INDENT>paths = scatter.__wrapped__(*args, **kwargs)<EOL>with suppress(KeyError):<EOL><INDENT>_nonscatter_pathcollections.remove(paths)<EOL><DEDENT>return paths<EOL><DEDENT>Axes.scatter = scatter<EOL>
Patch `PathCollection` and `scatter` to register their return values.

This registration allows us to distinguish `PathCollection`s created by
`Axes.scatter`, which should use point-like picking, from others, which
should use path-like picking.  The former is more common, so we store the
latter instead; this also lets us guess the type better if this module is
imported late.