'Internal implementation of instance attribute access for default
values.
Handles bookeeping around |PropertyContainer| value, etc.'

def _get_default(self, obj):

    if (self.name in obj._property_values):
        raise RuntimeError('Bokeh    internal    error,    does    not    handle    the    case    of    self.name    already    in    _property_values')
    is_themed = ((obj.themed_values() is not None) and (self.name in obj.themed_values()))
    default = self.instance_default(obj)
    if is_themed:
        if (self.name in obj._unstable_themed_values):
            return obj._unstable_themed_values[self.name]
        if self.property._may_have_unstable_default():
            if isinstance(default, PropertyValueContainer):
                default._register_owner(obj, self)
            obj._unstable_themed_values[self.name] = default
        return default
    if (self.name in obj._unstable_default_values):
        return obj._unstable_default_values[self.name]
    if self.property._may_have_unstable_default():
        if isinstance(default, PropertyValueContainer):
            default._register_owner(obj, self)
        obj._unstable_default_values[self.name] = default
    return default
