Parses a poll object

def poll_parser(poll):
    """
    Parses a poll object
    """
    if __is_deleted(poll):
        return deleted_parser(poll)
    if poll['type'] not in poll_types:
        raise Exception('Not a poll type')
    return Poll(
        poll['id'],
        poll['by'],
        __check_key('kids', poll),  # poll and pollopt differ this property
        __check_key('parts', poll),  # poll and pollopt differ this property
        poll['score'],
        poll['text'],
        poll['time'],
        poll['title'],
        poll['type'],
    )