def METHOD_NAME(self, model_cfg: Config):
    """Restore the original model config from the model config of the
    compressed model."""
    origin_model_cfg = copy.deepcopy(model_cfg)
    model = model_cfg['model']
    if 'architecture' in model:
        origin_model = model['architecture']
    elif 'algorithm' in model:
        origin_model = model['algorithm']['architecture']
    else:
        raise NotImplementedError()
    origin_model_cfg['model'] = origin_model
    if 'data_preprocessor' in origin_model:
        origin_model_cfg['data_preprocessor'] = origin_model[
            'data_preprocessor']
    return origin_model_cfg