<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def noisy_moments(self, moments: 'Iterable[cirq.Moment]', system_qubits: Sequence['cirq.Qid'] ) -> Sequence['cirq.OP_TREE']: """Adds possibly stateful noise to a series of moments. Args: moments: The moments to add noise to. system_qubits: A list of all qubits in the system. Returns: A sequence of OP_TREEs, with the k'th tree corresponding to the noisy operations for the k'th moment. """

        if not hasattr(self.noisy_moment, '_not_overridden'):
            result = []
            for moment in moments:
                result.append(self.noisy_moment(moment, system_qubits))
            return result

        if not hasattr(self.noisy_operation, '_not_overridden'):
            result = []
            for moment in moments:
                result.append([self.noisy_operation(op) for op in moment])
            return result

        assert False, 'Should be unreachable.'