code: public VariableVisibility getVariableVisibility(Node declaringNameNode) {
      Node parent = declaringNameNode.getParent();
  
      checkArgument(parent.isVar() || parent.isFunction() || parent.isParamList());
  
      return visibilityByDeclaringNameNode.get(declaringNameNode);
    }
docs: Returns the visibility of of a variable, given that variable's declaring
  name node.
  
  The name node's parent must be one of:
  <pre>
  Token.VAR (for a variable declaration)
  Token.FUNCTION (for a function declaration)
  Token.PARAM_LIST (for a function formal parameter)
  </pre>
  
  The returned visibility will be one of:
  <pre>
  LOCAL_VARIABLE : the variable is a local variable used only in its
  declared scope
  CAPTURED_LOCAL_VARIABLE : A local variable that is used in a capturing
  closure
  PARAMETER_VARIABLE : the variable is a formal parameter
  GLOBAL_VARIABLE : the variable is declared in the global scope
  </pre>
  
  @param declaringNameNode The name node for a declaration.