code: def save_wrapper(cls, save, new_class):
          
          def _wrapped(self, *args, **kwargs):
              if not self.installed:
                  raise AssertionError('Module %s is not installed' %
                                       self.verbose_name)
  
              logger.info("Saving %s module" % self.verbose_name)
              pre_save.send(sender=self)
              res = save(self, *args, **kwargs)
              post_save.send(sender=self)
              logger.info("Saved %s module" % self.verbose_name)
  
              return res
  
          return _wrapped
docs: Wrap the save method to call pre and post enable signals and update
          module status