'Apply a set of theme values which will be used rather than
defaults, but will not override application-set values.
The passed-in dictionary may be kept around as-is and shared with
other instances to save memory (so neither the caller nor the
|HasProps| instance should modify it).
Args:
property_values (dict) : theme values to use in place of defaults
Returns:
None'

def apply_theme(self, property_values):

    old_dict = self.themed_values()
    if (old_dict is property_values):
        return
    removed = set()
    if (old_dict is not None):
        removed.update(set(old_dict.keys()))
    added = set(property_values.keys())
    old_values = dict()
    for k in added.union(removed):
        old_values[k] = getattr(self, k)
    if (len(property_values) > 0):
        setattr(self, '__themed_values__', property_values)
    elif hasattr(self, '__themed_values__'):
        delattr(self, '__themed_values__')
    for (k, v) in old_values.items():
        if (k in self._unstable_themed_values):
            del self._unstable_themed_values[k]
    for (k, v) in old_values.items():
        descriptor = self.lookup(k)
        descriptor.trigger_if_changed(self, v)
