<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def seriesflow(self, dae):
 """ Compute the flow through the line after solving PF. Compute terminal injections, line losses """


        # Vm = dae.y[self.v]
        # Va = dae.y[self.a]
        # V1 = polar(Vm[self.a1], Va[self.a1])
        # V2 = polar(Vm[self.a2], Va[self.a2])

        I1 = mul(self.v1, div(self.y12 + self.y1, self.m2)) - \
            mul(self.v2, div(self.y12, self.mconj))
        I2 = mul(self.v2, self.y12 + self.y2) - \
            mul(self.v2, div(self.y12, self.m))

        self.I1_real = I1.real()
        self.I1_imag = I1.imag()
        self.I2_real = I2.real()
        self.I2_imag = I2.imag()

        self.S1 = mul(self.v1, conj(I1))
        self.S2 = mul(self.v2, conj(I2))

        self.P1 = self.S1.real()
        self.P2 = self.S2.real()
        self.Q1 = self.S1.imag()
        self.Q2 = self.S2.imag()

        self.chg1 = mul(self.g1 + 1j * self.b1, div(self.v1**2, self.m2))
        self.chg2 = mul(self.g2 + 1j * self.b2, self.v2**2)

        self.Pchg1 = self.chg1.real()
        self.Pchg2 = self.chg2.real()

        self.Qchg1 = self.chg1.imag()
        self.Qchg2 = self.chg2.imag()

        self._line_flows = matrix([self.P1, self.P2, self.Q1, self.Q2,
                                   self.I1_real, self.I1_imag,
                                   self.I2_real, self.I2_imag])