private static boolean isInsideErrorElement(@NotNull PyReferenceExpression referenceExpression) {
    return PsiTreeUtil.getParentOfType(referenceExpression, PsiErrorElement.class) != null;
  }
private static boolean isInsideErrorElement(@NotNull PyReferenceExpression referenceExpression)