def METHOD_NAME(
    circuit: 'cirq.AbstractCircuit', pauli_string: 'cirq.PauliString'
) -> 'cirq.AbstractCircuit':
    """A circuit measuring the given observable at the end of the given circuit."""
    assert pauli_string
    return circuit.from_moments(
        *circuit,
        pauli_string.to_z_basis_ops(),
        ops.measure(*sorted(pauli_string.keys()), key='out'),
    )