def _check_text_labels(self, texts, expected):
if not is_list_like(texts):<EOL><INDENT>assert texts.get_text() == expected<EOL><DEDENT>else:<EOL><INDENT>labels = [t.get_text() for t in texts]<EOL>assert len(labels) == len(expected)<EOL>for label, e in zip(labels, expected):<EOL><INDENT>assert label == e<EOL><DEDENT><DEDENT>
Check each text has expected labels

Parameters
----------
texts : matplotlib Text object, or its list-like
    target text, or its list
expected : str or list-like which has the same length as texts
    expected text label, or its list