docs: def plugin_for(cls, model):
          '''
          Find and return a plugin for this model. Uses inheritance to find a model where the plugin is registered.
          '''
          logger.debug("Getting a plugin for: %s", model)
          if not issubclass(model, Model):
              return
          if model in cls.plugins:
              return cls.plugins[model]
          for b in model.__bases__:
              p = cls.plugin_for(b)
              if p:
                  return p