def METHOD_NAME(self, obj: _GeneralObjectiveData):
    cobj = cmodel.process_lp_objective(
        self._expr_types,
        obj,
        self._pyomo_var_to_solver_var_map,
        self._pyomo_param_to_solver_param_map,
    )
    if obj is None:
        sense = 0
        cname = 'objective'
    else:
        cname = self._symbol_map.getSymbol(obj, self._obj_labeler)
        if obj.sense is minimize:
            sense = 0
        else:
            sense = 1
    cobj.sense = sense
    cobj.name = cname
    self._writer.objective = cobj