<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clip(bounds, output=DEFAULT_OUTPUT, margin=MARGIN, **kwargs):
 """Clip the DEM to given bounds. :param bounds: Output bounds in 'left bottom right top' order. :param output: Path to output file. Existing files will be overwritten. :param margin: Decimal degree margin added to the bounds. Use '%' for percent margin. :param cache_dir: Root of the DEM cache folder. :param product: DEM product choice. """

    bounds = build_bounds(bounds, margin=margin)
    datasource_root = seed(bounds=bounds, **kwargs)
    do_clip(datasource_root, bounds, output, **kwargs)