<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reduce(self, dimensions=[], function=None, spreadfn=None, **kwargs):
 """Applies a reduce function to all ViewableElement objects. See :py:meth:`Dimensioned.opts` and :py:meth:`Apply.__call__` for more information. """

        kwargs['_method_args'] = (dimensions, function, spreadfn)
        return self.__call__('reduce', **kwargs)