code: public static Matcher<TreeNode> context(final Matcher<ContextElement> matcher) {
      return new Matcher<TreeNode>() {
  
        @Override
        protected boolean matchesSafely(TreeNode t) {
          return matcher.matches(t.getContext());
        }
  
        @Override
        public String toString() {
          return "a context that has " + matcher;
        }
      };
    }
docs: Returns a matcher that matches tree nodes whose {@link TreeNode#getContext()}
  match against the supplied matcher.
  
  @param matcher {@code ContextElement} matcher
  @return a {@code TreeNode} matcher