<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def corner_grid(self):
 """Return a grid with only the corner points. Returns ------- cgrid : `RectGrid` Grid with size 2 in non-degenerate dimensions and 1 in degenerate ones Examples -------- uniform_grid([ 0., -1.], [ 1., 2.], (2, 2)) """

        minmax_vecs = []
        for axis in range(self.ndim):
            if self.shape[axis] == 1:
                minmax_vecs.append(self.coord_vectors[axis][0])
            else:
                minmax_vecs.append((self.coord_vectors[axis][0],
                                    self.coord_vectors[axis][-1]))

        return RectGrid(*minmax_vecs)