def predict_model(name, data, model=None):
    if model is None:
        model = train_model(name)
       
    try:
        pred = model.predict(data)
    except __HOLE__:
        raise AttributeError("Model %s does not implement a predict function" % name)
    
    cfgs = config.model_configs(name)     
    if 'postprocess_pred' in cfgs:
        postprocess_pred = getattr(predict, cfgs['postprocess_pred']['name'])
        pred = postprocess_pred(pred, **cfgs['postprocess_pred'].get('args', {})) 
    
    return pred
dataset/ETHPy150Open theusual/kaggle-seeclickfix-ensemble/Miroslaw/models.py/predict_model