'Add to the current properties of the container (params, schedules,
etc.) those of the layer/operator/model `model`.'

def merge_params(self, model):

    new_params_grad_scale = [ps for (ps, param) in zip(model.params_grad_scale, model.params) if (param not in self.params)]
    new_params = [param for param in model.params if (param not in self.params)]
    assert (len(new_params_grad_scale) == len(new_params))
    new_noise_params_shape_fn = [shape_fn for (shape_fn, noise_param) in zip(model.noise_params_shape_fn, model.noise_params) if (noise_param not in self.noise_params)]
    new_noise_params = [noise_param for noise_param in model.noise_params if (noise_param not in self.noise_params)]
    new_inputs = [inp for inp in model.inputs if (inp not in self.inputs)]
    new_schedules = [schedule for schedule in model.schedules if (schedule not in self.schedules)]
    new_updates = [update for update in model.updates if (update not in self.updates)]
    new_additional_gradients = [additional_gradient for additional_gradient in model.additional_gradients if (additional_gradient not in self.additional_gradients)]
    new_properties = [prop for prop in model.properties if (prop not in self.properties)]
    self.params += new_params
    self.params_grad_scale += new_params_grad_scale
    assert (len(self.params) == len(self.params_grad_scale))
    if hasattr(self, 'grads'):
        self.grads += [0 for param in new_params]
    self.noise_params += new_noise_params
    self.noise_params_shape_fn += new_noise_params_shape_fn
    self.inputs += new_inputs
    self.schedules += new_schedules
    self.updates += new_updates
    self.additional_gradients += new_additional_gradients
    self.properties += new_properties
