def validateInterpolations(cmodel, layers):
    """Validate logistic model interpolation.

    Args:
        cmodel (dict): Sub-dictionary from config for specific model.
        layers (dict): Dictionary of file names for all input layers.

    Returns:
        dict: Model interpolation methods.
    """
    interpolations = {}
    for key, value in cmodel['interpolations'].items():
        if key not in list(layers.keys()):
            raise Exception(
                'Interpolation key %s does not match any names of layers'
                % key)
        methods = ['linear', 'nearest', 'cubic', 'bilinear']
        if value not in methods:
            raise Exception(
                'Interpolation method %s not in approved list of methods: %s'
                % (key, str(methods)))
        interpolations[key] = value
    for key in list(layers.keys()):
        if key not in list(interpolations.keys()):
            raise Exception(
                'No interpolation method configured for layer %s' % key)
    return interpolations