code: def test_safe_getattr() -> None:
      helper = ErrorsHelper()
      assert (
          safe_getattr(helper, "raise_exception", "default")
          == "default"
      )
      assert (
          safe_getattr(helper, "raise_fail_outcome", "default")
          == "default"
      )
      with pytest.raises(BaseException):
          assert safe_getattr(helper, "raise_baseexception", "default")
  
imports: import enum
  import sys
  from functools import cached_property
  from functools import partial
  from functools import wraps
  from typing import TYPE_CHECKING
  from typing import Union
  import pytest
  from _pytest.compat import _PytestWrapper
  from _pytest.compat import assert_never
  from _pytest.compat import get_real_func
  from _pytest.compat import is_generator
  from _pytest.compat import safe_getattr
  from _pytest.compat import safe_isclass
  from _pytest.outcomes import OutcomeException
  from _pytest.pytester import Pytester
label_desc: Use image node_id 9 for calling a global function with example usage: test_safe_getattr() without return types