def make_mask_from_coords_list(mat, coords_list, val = 1):
    """
    Puts *val* (int) on *mat* (2D numpy.array) given coordinates
    that are list of lists with pairs of values
    """
    for coords in coords_list:
        for (x,y) in coords:
            mat[x,y] = val
    return mat