docs: @Nullable
    public static ExpressionTree getRootAssignable(MethodInvocationTree methodInvocationTree) {
      if (!(methodInvocationTree instanceof JCMethodInvocation)) {
        throw new IllegalArgumentException(
            "Expected type to be JCMethodInvocation, but was " + methodInvocationTree.getClass());
      }
  
      // Check for bare method call, e.g. intern().
      if (((JCMethodInvocation) methodInvocationTree).getMethodSelect() instanceof JCIdent) {
        return null;
      }
  
      // Unwrap the field accesses until you get to an identifier.
      ExpressionTree expr = methodInvocationTree;
      while (expr instanceof JCMethodInvocation) {
        expr = ((JCMethodInvocation) expr).getMethodSelect();
        if (expr instanceof JCFieldAccess) {
          expr = ((JCFieldAccess) expr).getExpression();
        }
      }
  
      // We only want assignable identifiers.
      Symbol sym = getSymbol(expr);
      if (sym instanceof VarSymbol) {
        return expr;
      }
      return null;
    }