private static @Nullable PsiElement getElement(PsiFile file, Editor editor) {
    PsiElement element = file.findElementAt(editor.getCaretModel().getCurrentCaret().getOffset());
    StringLiteralExpression stringLiteral = PsiTreeUtil.getParentOfType(element, StringLiteralExpression.class, false,
                                                                        PyFStringFragment.class);
    if (stringLiteral instanceof PyStringLiteralExpression && ((PyStringLiteralExpression)stringLiteral).isInterpolated()) {
      return null;
    }
    return stringLiteral;
  }
private static @Nullable PsiElement getElement(PsiFile file, Editor editor)