def METHOD_NAME(self):
    if self.firstPoint is not None:
        # always make sure the sub paths are closed; the algorithm only works
        # for closed paths.
        self.closePath()
    return self.intersectionCount