@NotNull
  private static List<PyExpression> getNamedElementsOfForAndWithStatements(@NotNull PsiElement element) {
    if (element instanceof PyForStatement forStatement) {
      final PyExpression target = forStatement.getForPart().getTarget();

      return dropUnderscores(PyUtil.flattenedParensAndStars(target));
    }
    else if (element instanceof PyWithStatement withStatement) {
      final List<PyExpression> result = new ArrayList<>();

      for (PyWithItem item : withStatement.getWithItems()) {
        final PyExpression target = item.getTarget();
        if (target != null) {
          result.addAll(PyUtil.flattenedParensAndTuples(target));
        }
      }

      return dropUnderscores(result);
    }

    return Collections.emptyList();
  }
@NotNull
  private static List<PyExpression> getNamedElementsOfForAndWithStatements(@NotNull PsiElement element)