code: def has_pyvista():
      """Check that PyVista is installed."""
      try:
          with warnings.catch_warnings():
              warnings.filterwarnings(
                  "ignore", category=DeprecationWarning
              )
              import pyvista  # noqa: F401
          return True
      except ImportError:
          return False
  
imports: import warnings
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: has_pyvista() and returns: True, False