code: def test_import_optional_dependency_absent():
      with pytest.raises(
          ImportError, match="Missing optional dependency 'foo'"
      ):
          import_optional_dependency("foo")
  
      with pytest.raises(ImportError, match="foo is required"):
          import_optional_dependency("foo", extra="foo is required")
  
imports: import pytest
  from geopandas._compat import import_optional_dependency
label_desc: Use image node_id 2 for calling a global function with example usage: test_import_optional_dependency_absent() without return types