docs: def _attribute_is_magic(node, attrs, parents):
      """Checks that node is an attribute used inside one of allowed parents"""
      if node.attrname not in attrs:
          return False
      if not node.last_child():
          return False
  
      try:
          for cls in node.last_child().inferred():
              if isinstance(cls, Super):
                  cls = cls._self_class  # pylint: disable=protected-access
              if node_is_subclass(cls, *parents) or cls.qname() in parents:
                  return True
      except InferenceError:
          pass
      return False