def copy(
        self,
        coefficient: cirq.TParamValComplex | None = None,
        pauli_mask: None | str | Iterable[int] | np.ndarray = None,
    ) -> Self:
        """Returns a copy with possibly modified contents.

        Args:
            coefficient: The new coefficient value. If not specified, defaults
                to the current `coefficient` value.
            pauli_mask: The new `pauli_mask` value. If not specified, defaults
                to the current pauli mask value.

        Returns:
            A copied instance.
        """
Returns a copy with possibly modified contents.

        Args:
            coefficient: The new coefficient value. If not specified, defaults
                to the current `coefficient` value.
            pauli_mask: The new `pauli_mask` value. If not specified, defaults
                to the current pauli mask value.

        Returns:
            A copied instance.
        
cirq-core/cirq/ops/dense_pauli_string.py