def clip_bounds(bounds=None, clip=None):
bounds = Bounds(*bounds)<EOL>clip = Bounds(*clip)<EOL>return Bounds(<EOL>max(bounds.left, clip.left),<EOL>max(bounds.bottom, clip.bottom),<EOL>min(bounds.right, clip.right),<EOL>min(bounds.top, clip.top)<EOL>)<EOL>
Clips bounds by clip.

Parameters
----------
bounds : bounds to be clipped
clip : clip bounds

Returns
-------
Bounds(left, bottom, right, top)