def METHOD_NAME(model_class):
    config = {'model_class': model_class}
    dataset, model_config = model_setup_images_clf(data_format='channels_first')
    train_template = (Pipeline()
        .init_model('model', model_class, 'dynamic', model_config)
        .to_array(dtype='float32')
        .train_model('model', inputs=B('images'), targets=B('labels'), outputs='loss')
    )
    predict_template = (Pipeline()
        .init_variable('predictions', default=[])
        .to_array(dtype='float32')
        .predict_model('model', inputs=B('images'),
                    outputs='predictions',
                    save_to=V('predictions', mode='a'))
    )
    train_pipeline = (train_template + predict_template) << dataset << config
    inference_pipeline = predict_template << dataset << config
    return train_pipeline, inference_pipeline