private @Nullable PyStringLiteralExpression modifyDocStringByOwnerType(@Nullable PyStringLiteralExpression docstring,
                                                                         @NotNull PyDocStringOwner owner,
                                                                         boolean isProperty) {
    if (docstring != null) return docstring;

    if (owner instanceof PyClass pyClass) {
      final PyFunction init = pyClass.findMethodByName(PyNames.INIT, false, myContext);
      // if class doesn't have any doc return init doc
      if (init != null) {
        return getEffectiveDocStringExpression(init);
      }
    }
    else if (owner instanceof PyFunction pyFunction) {
      final PyClass containingClass = pyFunction.getContainingClass();
      if (containingClass != null && !isProperty) {
        // add docstring from the parent class or function
        return addFunctionInheritedDocString(pyFunction, containingClass);
      }
    }
    return docstring;
  }
private @Nullable PyStringLiteralExpression modifyDocStringByOwnerType(@Nullable PyStringLiteralExpression docstring,
                                                                         @NotNull PyDocStringOwner owner,
                                                                         boolean isProperty)