code: def _vertex_list_to_sframe(ls, id_column_name):
      
      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
docs: Convert a list of vertices into an SFrame.