<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def headloss_gen(Area, Vel, PerimWetted, Length, KMinor, Nu, PipeRough):
 """Return the total head lossin the general case. Total head loss is a combination of major and minor losses. This equation applies to both laminar and turbulent flows. """

    #Inputs do not need to be checked here because they are checked by
    #functions this function calls.
    return (headloss_exp_general(Vel, KMinor).magnitude
            + headloss_fric_general(Area, PerimWetted, Vel,
                                     Length, Nu, PipeRough).magnitude)