code: def register(model, admin=None, category=None):
      
      def _model_admin_wrapper(admin_class):
  
          site.register(model, admin_class=admin_class)
  
          if category:
              site.register_block(model, category)
  
          return admin_class
      return _model_admin_wrapper
docs: Decorator to registering you Admin class.