code: def add_work_units(self, work_spec_name, work_unit_key_vals):
          '''
          work_unit_key_vals list of (work_unit_key, work_unit_data)
          '''
          with self.registry.lock(identifier=self.worker_id) as session:
              window_size = 10**4
              for i in xrange(0, len(work_unit_key_vals), window_size):
                  self.registry.re_acquire_lock()
                  session.update(WORK_UNITS_ + work_spec_name,
                                 dict(work_unit_key_vals[i: i + window_size])f add_work_units(self, work_spec_name, work_unit_key_vals):
          '''
          work_unit_key_vals list of (work_unit_key, work_unit_data)
          '''
          with self.registry.lock(identifier=self.worker_id) as session:
              window_size = 10**4
              for i in xrange(0, len(work_unit_key_vals), window_size):
                  self.registry.re_acquire_lock()
                  session.update(WORK_UNITS_ + work_spec_name,
                                 dict(work_unit_key_vals[i: i + window_size]))
docs: work_unit_key_vals list of (work_unit_key, work_unit_data)