<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def calc_qdgz_v1(self):
 """Aggregate the amount of total direct flow released by all HRUs. Required control parameters: |Lnk| |NHRU| |FHRU| Required flux sequence: |QDB| |NKor| |EvI| Calculated flux sequence: |QDGZ| Basic equation: :math:`QDGZ = \\Sigma(FHRU \\cdot QDB) + \\Sigma(FHRU \\cdot (NKor_{FLUSS}-EvI_{FLUSS}))` Examples: The first example shows that |QDGZ| is the area weighted sum of |QDB| from "land type" HRUs like arable land (|ACKER|) and sealed surfaces (|VERS|) as well as of |NKor|-|EvI| from water areas of type |FLUSS|. Water areas of type |WASSER| and |SEE| have no impact on |QDGZ|: qdgz(5.0) The second example shows that large evaporation values above a HRU of type |FLUSS| can result in negative values of |QDGZ|: qdgz(-3.0) """

    con = self.parameters.control.fastaccess
    flu = self.sequences.fluxes.fastaccess
    flu.qdgz = 0.
    for k in range(con.nhru):
        if con.lnk[k] == FLUSS:
            flu.qdgz += con.fhru[k]*(flu.nkor[k]-flu.evi[k])
        elif con.lnk[k] not in (WASSER, SEE):
            flu.qdgz += con.fhru[k]*flu.qdb[k]