code: def test_attribute_failure():
      class Foo:
          def _get_b(self):
              raise Exception("Failed to get attrib")
  
          b = property(_get_b)
  
      i = Foo()
      assert i.b == 2
  
imports: import pytest
  from pytest import raises
label_desc: Use image node_id 7 for calling a global function with example usage: test_attribute_failure() without return types