code: def time_slices_to_layers(graphs,
                            interslice_weight=1,
                            slice_attr='slice',
                            vertex_id_attr='id',
                            edge_type_attr='type',
                            weight_attr='weight'):
    
    G_slices = _ig.Graph.Tree(len(graphs), 1, mode=_ig.TREE_UNDIRECTED)
    G_slices.es[weight_attr] = interslice_weight
    G_slices.vs[slice_attr] = graphs
    return slices_to_layers(G_slices,
                            slice_attr,
                            vertex_id_attr,
                            edge_type_attr,
                            weight_attr)
docs: Convert time slices to layer graphs.
  
    Each graph is considered to represent a time slice. This function simply
    connects all the consecutive slices (i.e. the slice graph) with an
    ``interslice_weight``.  The further conversion is then delegated to
    :func:`slices_to_layers`, which also provides further details.
  
    See Also
    --------
    :func:`find_partition_temporal`
  
    :func:`slices_to_layers`