public static boolean variableIsAssigned(@NotNull PsiVariable variable, @Nullable PsiElement context) {
    if (context == null || variable.isUnnamed()) {
      return false;
    }
    final VariableAssignedVisitor visitor = new VariableAssignedVisitor(variable);
    context.accept(visitor);
    return visitor.isAssigned();
  }
public static boolean variableIsAssigned(@NotNull PsiVariable variable, @Nullable PsiElement context)