<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def chain_update(self, block, receipts):
 """Removes batches from the pending cache if found in the block store, and notifies any observers. """

        with self._lock:
            for batch_id in self._pending.copy():
                if self._batch_committed(batch_id):
                    self._pending.remove(batch_id)
                    self._update_observers(batch_id,
                                           ClientBatchStatus.COMMITTED)