def _imul_helper_checkpoint(self, other: cirq.PAULI_STRING_LIKE, sign: int):
        """Like `_imul_helper` but guarantees no-op on error."""

        if not isinstance(other, (numbers.Number, PauliString, MutablePauliString)):
            other = MutablePauliString()._imul_helper(other, sign)
            if other is NotImplemented:
                return NotImplemented
        return self._imul_helper(other, sign)
Like `_imul_helper` but guarantees no-op on error.
cirq-core/cirq/ops/pauli_string.py