def _check_visible(self, collections, visible=True):
from matplotlib.collections import Collection<EOL>if not isinstance(collections,<EOL>Collection) and not is_list_like(collections):<EOL><INDENT>collections = [collections]<EOL><DEDENT>for patch in collections:<EOL><INDENT>assert patch.get_visible() == visible<EOL><DEDENT>
Check each artist is visible or not

Parameters
----------
collections : matplotlib Artist or its list-like
    target Artist or its list or collection
visible : bool
    expected visibility