<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def l_objective(model,objective=None):
 """ A replacement for pyomo's Objective that quickly builds linear objectives. Instead of model.objective = Objective(expr=sum(vars[i]*coeffs[i] for i in index)+constant) call instead l_objective(model,objective) where objective is an LExpression. Variables may be repeated with different coefficients, which pyomo will sum up. Parameters model : pyomo.environ.ConcreteModel objective : LExpression """


    if objective is None:
        objective = LExpression()

    #initialise with a dummy
    model.objective = Objective(expr = 0.)
    model.objective._expr = _build_sum_expression(objective.variables, constant=objective.constant)