<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_model(self, model):
 """ Add a `RegressionModel` instance. Parameters model : `RegressionModel` Should have a ``.name`` attribute matching one of the groupby segments. """

        logger.debug(
            'adding model {} to group {}'.format(model.name, self.name))
        self.models[model.name] = model