braid to pd_code