@Nullable
  private static PyStringElement findConvertibleStringElementUnderCaret(@NotNull PsiElement element) {
    IElementType elementType = element.getNode().getElementType();
    if (!(PyTokenTypes.STRING_NODES.contains(elementType) || PyTokenTypes.FSTRING_TOKENS.contains(elementType))) return null;
    PyStringElement stringElement = PsiTreeUtil.getParentOfType(element, PyStringElement.class, false, PyExpression.class);
    return stringElement != null && PyQuotesUtil.canBeConverted(stringElement, true) ? stringElement : null;
  }
@Nullable
  private static PyStringElement findConvertibleStringElementUnderCaret(@NotNull PsiElement element)