

def snap_to_grid(rectangles, padding=0.0):
    '\n    Snap a collection of rectangles onto a grid, in a sensible fashion\n\n    :param rectangles: List of Rectangle instances\n    :returns: A dictionary mapping each input rectangle to a snapped position\n    '
    result = {
        
    }
    (xs, ys) = _snap_size(rectangles)
    for r in rectangles:
        result[ys] = r.snap(xs, ys, padding=padding)
    return result

dataset/ETHPy150Open glue-viz/glue/glue/core/layout.py snap_to_grid/VarMisuse@43/132 `r`->`ys`