def _map_func(op: cirq.Operation, _):
        """Maps an op with tag `{tag_prefix}_i` to a symbolzied `PhasedXZGate(xi,zi,ai)`."""
        tags: set[Hashable] = set(op.tags)
        tag_id: None | int = None
        for tag in tags:
            if re.fullmatch(f"{symbolize_tag.prefix}_\\d+", str(tag)):
                if tag_id is None:
                    tag_id = int(str(tag).rsplit("_", maxsplit=-1)[-1])
                else:
                    raise ValueError(f"Multiple tags are prefixed with {symbolize_tag.prefix}.")
        if tag_id is None:
            return op
        tags.remove(f"{symbolize_tag.prefix}_{tag_id}")
        phxz_params = {
            "x_exponent": sympy.Symbol(f"x{tag_id}"),
            "z_exponent": sympy.Symbol(f"z{tag_id}"),
            "axis_phase_exponent": sympy.Symbol(f"a{tag_id}"),
        }

        return ops.PhasedXZGate(**phxz_params).on(*op.qubits).with_tags(*tags)
Maps an op with tag `{tag_prefix}_i` to a symbolzied `PhasedXZGate(xi,zi,ai)`.
cirq-core/cirq/transformers/symbolize.py