'Runs a function on every object contained within this one.
Args:
func (callable): Function to call. This must have the
formal call sign func(obj, **kwargs), where obj is the
object currently being processed and `**kwargs` are
passed on from the call to `for_contents`.
exclude (list, optional): A list of object not to call the
function on.
Kwargs:
Keyword arguments will be passed to the function for all objects.'

def for_contents(self, func, exclude=None, **kwargs):

    contents = self.contents
    if exclude:
        exclude = make_iter(exclude)
        contents = [obj for obj in contents if (obj not in exclude)]
    for obj in contents:
        func(obj, **kwargs)
