7. Given the complex number $z$ satisfies $|z|=1$, then the maximum value of $\left|z^{3}+z^{2}-5 z+3\right|$ is $\qquad$

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
$$
\begin{array}{l}
z^{3}+z^{2}-5 z+3=(z-1)^{2}(z+3), \text{ let } z=\cos \theta+\mathrm{i} \sin \theta, \\
\text{ then }\left|z^{3}+z^{2}-5 z+3\right|=|z-1|^{2} \cdot|z+3| \\
=\left[(\cos \theta-1)^{2}+\sin ^{2} \theta\right] \cdot \sqrt{(\cos \theta+3)^{2}+\sin ^{2} \theta}=2(1-\cos \theta) \sqrt{10+6 \cos \theta} \\
=\frac{2}{3} \sqrt{(3-3 \cos \theta)^{2}(10+6 \cos \theta)} \leqslant \frac{2}{3} \sqrt{\left(\frac{16}{3}\right)^{3}}=\frac{128 \sqrt{3}}{27},
\end{array}
$$

The equality holds when $\cos \theta=-\frac{7}{9}$. Therefore, the maximum value of $\left|z^{3}+z^{2}-5 z+3\right|$ is $\frac{128 \sqrt{3}}{27}$.