This was accidentally removed in https://projects.blender.org/blender/blender/commit/d70b10dcd4
anim.slot_new_for_id