def substring_not_in_axes(substring: str, ax: mpl.axes.Axes) -> bool:
    """
    Return True if a substring is not found anywhere in an axes
    """
    alltxt: set[str] = {t.get_text() for t in ax.findobj(mpl.text.Text)}
    check = [(substring not in txt) for txt in alltxt]
    return all(check)

    Return True if a substring is not found anywhere in an axes
    
xarray/tests/test_plot.py