def get_grid_edges(points):
    """Get edges of grid containing all points."""
    grid_edges = []
    for index in range(2):
        point = []
        for func in (min, max):
            funciest_point = func(points, key=lambda item: item[index])
            point.append(func(funciest_point))
        grid_edges.append(point)
    return grid_edges