def get_updater(api, resource_type):
    """Returns the method to update a given resource type

    """
    updaters = {
        "source": api.update_source,
        "dataset": api.update_dataset,
        "model": api.update_model,
        "ensemble": api.update_ensemble,
        "batchprediction": api.update_batch_prediction,
        "prediction": api.update_prediction,
        "evaluation": api.update_evaluation
    }
    return updaters[resource_type]