def _verify_mpl() -> None:
    """Verify that matplotlib is installed and imported."""
    if not mpl_available:  # pragma: no cover
        msg = "matplotlib must be installed as an optional dependency for visualization."
        raise ImportError(msg)
Verify that matplotlib is installed and imported.
osmnx/plot.py