def find_partition_multiplex(graphs, partition_type, **kwargs):
n_layers = len(graphs)<EOL>partitions = []<EOL>layer_weights = [<NUM_LIT:1>]*n_layers<EOL>for graph in graphs:<EOL><INDENT>partitions.append(partition_type(graph, **kwargs))<EOL><DEDENT>optimiser = Optimiser()<EOL>improvement = optimiser.optimise_partition_multiplex(partitions, layer_weights)<EOL>return partitions[<NUM_LIT:0>].membership, improvement<EOL>
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)