def parse_area_coords(string):
    """Given a line describing an area of a matrix,
    return all the coordinates within that area.

    Ex: #1 @ 258,327: 19x22
        -> [(258, 327), (259, 327), ..., (276, 327), ..., (276, 348)]"""
    _, _, left_top, area = string.split(' ')
    left, top = [int(num) for num in left_top[:-1].split(',')]
    width, height = [int(num) for num in area.split('x')]

    return [(i, j) for i in range(left, left + width) for j in range(top, top + height)]