

def _update_comments_timestamp(auth, node, page=Comment.OVERVIEW, root_id=None):
    if node.is_contributor(auth.user):
        enqueue_postcommit_task((ban_url, (node,)))
        if (root_id is not None):
            guid_obj = Guid.load(root_id)
            if (guid_obj is not None):
                enqueue_postcommit_task((ban_url, (guid_obj.referent,)))
        if (page == Comment.OVERVIEW):
            root_id = node._id
        auth.user.comments_viewed_timestamp[root_id] = datetime.utcnow()
        auth.user.save()
        return {
            root_id: auth.user.comments_viewed_timestamp[root_id].isoformat(),
        }
    else:
        return {
            
        }

dataset/ETHPy150Open CenterForOpenScience/osf.io/website/project/views/comment.py _update_comments_timestamp/original