inspecting generalized attributes in the AST with the libclang python bindings

I’m writing a tool to parse generalized attributes that annotate a source file.
I’m trying to parse the following code with the libclang python bindings:

test.h: