def comment_parser(comment):
    """
    Parses a comment object
    """
    try:
        if comment['type'] != 'comment':
            return item_parser(comment)
    except KeyError:
        return deleted_parser(comment)
    return Comment(
        comment['id'],
        comment['by'],
        __check_key('kids', comment),  # some comments do not have kids key
        comment['parent'],
        comment['text'],
        comment['time'],
        comment['type'],
    )
Parses a comment object