<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _vertex_list_to_sframe(ls, id_column_name):
 """ Convert a list of vertices into an SFrame. """

    sf = SFrame()

    if type(ls) == list:
        cols = reduce(set.union, (set(v.attr.keys()) for v in ls))
        sf[id_column_name] = [v.vid for v in ls]
        for c in cols:
            sf[c] = [v.attr.get(c) for v in ls]

    elif type(ls) == Vertex:
        sf[id_column_name] = [ls.vid]
        for col, val in ls.attr.iteritems():
            sf[col] = [val]

    else:
        raise TypeError('Vertices type {} is Not supported.'.format(type(ls)))

    return sf