code: def register_model(self, model_cls):
          
          if not getattr(model_cls, '_database_'):
              raise ModelAttributeError('_database_ missing '
                                        'on %s!' % model_cls.__name__)
          if not getattr(model_cls, '_collection_'):
              raise ModelAttributeError('_collection_ missing '
                                        'on %s!' % model_cls.__name__)
  
          model_cls._mongo_client_ = self.client
  
          logging.info('Registering Model ' + model_cls.__name__)
          return model_cls
docs: Decorator for registering model.