def getDocComment(node):
    """
    Returns the first doc comment of the given node.
    """
    
    comments = getattr(node, "comments", None)
    if comments:
        for comment in comments:
            if comment.variant == "doc":
                return comment
                
    return None