Add graph clean method