code: def find_partition_multiplex(graphs, partition_type, **kwargs):
    
    n_layers = len(graphs)
    partitions = []
    layer_weights = [1]*n_layers
    for graph in graphs:
      partitions.append(partition_type(graph, **kwargs))
    optimiser = Optimiser()
    improvement = optimiser.optimise_partition_multiplex(partitions, layer_weights)
    return partitions[0].membership, improvement
docs: Detect communities for multiplex graphs.
  
    Each graph should be defined on the same set of vertices, only the edges may
    differ for different graphs. See
    :func:`Optimiser.optimise_partition_multiplex` for a more detailed
    explanation.
  
    Parameters
    ----------
    graphs : list of :class:`ig.Graph`
      List of :class:`louvain.VertexPartition` layers to optimise.
  
    partition_type : type of :class:`MutableVertexPartition`
      The type of partition to use for optimisation (identical for all graphs).
  
    **kwargs
      Remaining keyword arguments, passed on to constructor of ``partition_type``.
  
    Returns
    -------
    list of int
      membership of nodes.
  
    float
      Improvement in quality of combined partitions, see
      :func:`Optimiser.optimise_partition_multiplex`.
  
    Notes
    -----
    We don't return a partition in this case because a partition is always
    defined on a single graph. We therefore simply return the membership (which
    is the same for all layers).
  
    See Also
    --------
    :func:`Optimiser.optimise_partition_multiplex`
  
    :func:`slices_to_layers`
  
    Examples
    --------
    >>> n = 100
    >>> G_1 = ig.Graph.Lattice([n], 1)
    >>> G_2 = ig.Graph.Lattice([n], 1)
    >>> membership, improvement = louvain.find_partition_multiplex([G_1, G_2],
    ...                                                            louvain.ModularityVertexPartition)