static boolean isVariableUsedIn(@NotNull PsiVariable variable, @NotNull PsiElement code) {
    VariableUsedVisitor visitor = new VariableUsedVisitor(variable);
    code.accept(visitor);
    return visitor.isUsed();
  }
static boolean isVariableUsedIn(@NotNull PsiVariable variable, @NotNull PsiElement code)