(node)
return doc or ""
Get the docstring of a node, using a parent docstring if needed.

    :param node: The node to get a docstring for.
    :type node: astroid.nodes.FunctionDef
Get the docstring of a node, using a parent docstring if needed.
Get the docstring of a node using a parent docstring if needed .
def get_func_docstring(node):
    """Get the docstring of a node, using a parent docstring if needed.

    :param node: The node to get a docstring for.
    :type node: astroid.nodes.FunctionDef
    """
    doc = node.doc

    if doc is None and isinstance(node.parent, astroid.nodes.ClassDef):
        for base in node.parent.ancestors():
            if node.name in ("__init__", "__new__") and base.qname() in (
                "__builtins__.object",
                "builtins.object",
                "builtins.type",
            ):
                continue
            for child in base.get_children():
                if (
                    isinstance(child, node.__class__)
                    and child.name == node.name
                    and child.doc is not None
                ):
                    return child.doc

    return doc or ""
def get_func_docstring ( node ) : doc = node . doc if doc is None and isinstance ( node . parent , astroid . nodes . ClassDef ) : for base in node . parent . ancestors ( ) : if node . name in ( "__init__" , "__new__" ) and base . qname ( ) in ( "__builtins__.object" , "builtins.object" , "builtins.type" , ) : continue for child in base . get_children ( ) : if ( isinstance ( child , node . __class__ ) and child . name == node . name and child . doc is not None ) : return child . doc return doc or ""