This is what I'd naively think it should be:

playbook = msg['msg']['playbook'].split('/')[-1]