from typing import OrderedDict


def init_model_attr(model):
    """
    Initialize pscale attribute of a model object
    """
    if not hasattr(model, 'pscale'):
        model.pscale = OrderedDict()
        for k in model.param_names:
            model.pscale[k] = 1.
    else:
        for k in model.param_names:
            if k not in model.pscale:
                model.pscale[k] = 1.
    
    return model