from typing import Iterable


def to_abs_coord(v, mat):
    """
    Change the local vertices coordinate to absolute coordinate
    :param v:  vector or a list of vertices
    :param mat: matrix_world
    :return: the Absolute vertices
    """
    if isinstance(v, Iterable):
        list_verts = []
        for i in v:
            list_verts.append(mat * i)
        return type(v)(list_verts)
    else:
        return mat * v