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