<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def snap_bbox(ctx, bounds, zoom):
 """Snap bbox to tile grid."""

    click.echo(box(*tilematrix.snap_bounds(
        bounds=bounds,
        tile_pyramid=TilePyramid(
            ctx.obj['grid'],
            tile_size=ctx.obj['tile_size'],
            metatiling=ctx.obj['metatiling']
        ),
        zoom=zoom,
        pixelbuffer=ctx.obj['pixelbuffer']
    )))