code: def _skip_if_no_mpl() -> bool:
      mod = safe_import("matplotlib")
      if mod:
          mod.use("Agg")
          return False
      else:
          return True
  
imports: from __future__ import annotations
  import locale
  from typing import Callable
  import numpy
  import pytest
  from pandas._config import get_option
  from pandas._typing import F
  from pandas.compat import IS64, is_platform_windows
  from pandas.compat._optional import import_optional_dependency
  from pandas.core.computation.expressions import NUMEXPR_INSTALLED, USE_NUMEXPR
  from pandas.util.version import Version
label_desc: Use image node_id 2 for calling a global function with example usage: _skip_if_no_mpl() and returns: False, True