'This method implements how to retrieve the value of this parameter from
the model instance.  See also `Parameter._set_model_value`.
These methods take an explicit model argument rather than using
self._model so that they can be used from unbound `Parameter`
instances.'

def _get_model_value(self, model):

    if (not hasattr(model, u'_parameters')):
        raise AttributeError(self._name)
    param_metrics = model._param_metrics[self._name]
    param_slice = param_metrics[u'slice']
    param_shape = param_metrics[u'shape']
    value = model._parameters[param_slice]
    if param_shape:
        value = value.reshape(param_shape)
    else:
        value = value[0]
    return value
