<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_attributes(self, **original_kwargs):
 """ Updates attributes of every layout object pointed in `self.slice` using kwargs """

        def update_attrs(layout_object):
            kwargs = original_kwargs.copy()
            if hasattr(layout_object, 'attrs'):
                if 'css_class' in kwargs:
                    if 'class' in layout_object.attrs:
                        layout_object.attrs['class'] += " %s" % kwargs.pop('css_class')
                    else:
                        layout_object.attrs['class'] = kwargs.pop('css_class')
                layout_object.attrs.update(kwargs)

        self.map(update_attrs)