<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _series_feedback(series, out_port, in_port):
 """Invert a series self-feedback twice to get rid of unnecessary permutations."""

    series_s = series.series_inverse().series_inverse()
    if series_s == series:
        raise CannotSimplify()
    return series_s.feedback(out_port=out_port, in_port=in_port)