<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stop_recording(self):
 """Stop recording from the audio source."""

        self._stop_recording.set()
        with self._source_lock:
            self._source.stop()
        self._recording = False