Generalize bulk_operations logic
LMS-11366