<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def panzoom(marks):
 """Helper function for panning and zooming over a set of marks. Creates and returns a panzoom interaction with the 'x' and 'y' dimension scales of the specified marks. """

    return PanZoom(scales={
            'x': sum([mark._get_dimension_scales('x', preserve_domain=True) for mark in marks], []),
            'y': sum([mark._get_dimension_scales('y', preserve_domain=True) for mark in marks], [])
    })