pan class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">Categorical</span><span class="p">(</span><span class="n">train_mask</span><span class="p">)</span>

<span class="c1">#randomly split adata into 50/50 origin (train) and destination (test)</span>
<span class="n">adt</span><span class="o">.</span><span class="n">adata_dict_fapply</span><span class="p">(</span><span class="n">adata_dict</span><span class="p">,</span> <span class="n">assign_training_test_split</span><span c