<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract_edges(self, feature_angle=30, boundary_edges=True, non_manifold_edges=True, feature_edges=True, manifold_edges=True, inplace=False):
 """ Extracts edges from a surface. From vtk documentation, the edges are one of the following 1) boundary (used by one polygon) or a line cell 2) non-manifold (used by three or more polygons) 3) feature edges (edges used by two triangles and whose dihedral angle > feature_angle) 4) manifold edges (edges used by exactly two polygons). Parameters feature_angle : float, optional Defaults to 30 degrees. boundary_edges : bool, optional Defaults to True non_manifold_edges : bool, optional Defaults to True feature_edges : bool, optional Defaults to True manifold_edges : bool, optional Defaults to True inplace : bool, optional Return new mesh or overwrite input. Returns ------- edges : vtki.vtkPolyData Extracted edges. None if inplace=True. """

        featureEdges = vtk.vtkFeatureEdges()
        featureEdges.SetInputData(self)
        featureEdges.SetFeatureAngle(feature_angle)
        featureEdges.SetManifoldEdges(manifold_edges)
        featureEdges.SetNonManifoldEdges(non_manifold_edges)
        featureEdges.SetBoundaryEdges(boundary_edges)
        featureEdges.SetFeatureEdges(feature_edges)
        featureEdges.SetColoring(False)
        featureEdges.Update()

        mesh = _get_output(featureEdges)
        if inplace:
            self.overwrite(mesh)
        else:
            return mesh