code: def set_objective_sense(self, sense):
          
  
          if sense not in (ObjectiveSense.Minimize, ObjectiveSense.Maximize):
              raise ValueError('Invalid objective sense')
  
          swiglpk.glp_set_obj_dir(self._p, self.OBJ_SENSE_MAP[sense])
docs: Set type of problem (maximize or minimize).