I don't think we necessarily have to code a full example, something similar to the pivot documentation above would be more than enough. For example, describing in words what this function would try to do for a comment activity would help I think.