<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot_boundaries(self, **kwargs):
 """ Plots boundaries of a mesh """

        edges = self.extract_edges()

        plotter = vtki.Plotter(off_screen=kwargs.pop('off_screen', False),
                               notebook=kwargs.pop('notebook', None))
        plotter.add_mesh(edges, 'r', style='wireframe', legend='Edges')
        plotter.add_mesh(self, legend='Mesh', **kwargs)
        return plotter.show()