code: def set_value(self, general_object_model_class, group, key=None, value=None):
          
          if key is None:
              key = group
  
          obj = self.get_queryset_by_group_and_key(group=group, key=key).first()
          if obj is None:
              obj = general_object_model_class(
                  group=group,
                  key=key,
                  value=value
              )
  
          else:
              obj.value = value
  
          self.session.add(obj)
          self.session.commit()
          return obj
docs: set|create/update