def has_destructor(class_):
class_ = class_traits.get_declaration(class_)<EOL>destructor = class_.decls(<EOL>decl_type=calldef_members.destructor_t,<EOL>recursive=False,<EOL>allow_empty=True)<EOL>if destructor:<EOL><INDENT>return destructor[<NUM_LIT:0>]<EOL><DEDENT>
if class has destructor, this function will return reference to it,
    None otherwise