@staticmethod
def _check_triangles(triangles, point_length):
    """
        Verifies that the triangles are valid.

        Args:
            triangles (iterable): Array of the triangles
            point_length (int): Count of all points
        """
    if len(triangles) % 3 != 0:
        raise ValueError(
            '"triangles" must be a list of point indexes divisible by 3 defining each triangle.'
            )
    max_triangles = max(triangles)
    if max_triangles > point_length - 1:
        raise ValueError('point in triangles is out of range: {}'.format(
            max_triangles))
    min_triangles = min(triangles)
    if min_triangles < 0:
        raise ValueError('point in triangles is out of range: {}'.format(
            min_triangles))
