code: def path_valid(self):
          
          valid = [i is not None for i in self.polygons_closed]
          valid = np.array(valid, dtype=np.bool)
          return valid
docs: Returns
          ----------
          path_valid: (n,) bool, indexes of self.paths self.polygons_closed
                           which are valid polygons