def METHOD_NAME(self, model):
    """
    Set the model containing an unit.
    :param pyFAI.gui.model.DataUnit.DataUnit: Model containing
        the unit.
    """
    if self.__displayedUnitModel is not None:
        self.__displayedUnitModel.changed.disconnect(self.__displayedUnitChanged)
    self.__displayedUnitModel = model
    if self.__displayedUnitModel is not None:
        self.__displayedUnitModel.changed.connect(self.__displayedUnitChanged)
    self.__displayedUnitChanged()