<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def boolean_cut(self, cut, tolerance=1E-5, inplace=False):
 """ Performs a Boolean cut using another mesh. Parameters cut : vtki.PolyData Mesh making the cut inplace : bool, optional Updates mesh in-place while returning nothing. Returns ------- mesh : vtki.PolyData The cut mesh when inplace=False """

        bfilter = vtk.vtkBooleanOperationPolyDataFilter()
        bfilter.SetOperationToIntersection()
        # bfilter.SetOperationToDifference()

        bfilter.SetInputData(1, cut)
        bfilter.SetInputData(0, self)
        bfilter.ReorientDifferenceCellsOff()
        bfilter.SetTolerance(tolerance)
        bfilter.Update()

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