You can similarly use bulk_upsert in manager utils to take care of doing bulk get_or_creates like you are here.