def __init__(self, graph, initial_membership=None, weights=None, node_sizes=None, resolution_parameter=<NUM_LIT:1.0>):
if initial_membership is not None:<EOL><INDENT>initial_membership = list(initial_membership)<EOL><DEDENT>super(RBERVertexPartition, self).__init__(graph, initial_membership)<EOL>pygraph_t = _get_py_capsule(graph)<EOL>if weights is not None:<EOL><INDENT>if isinstance(weights, str):<EOL><INDENT>weights = graph.es[weights]<EOL><DEDENT>else:<EOL><INDENT>weights = list(weights)<EOL><DEDENT><DEDENT>if node_sizes is not None:<EOL><INDENT>if isinstance(node_sizes, str):<EOL><INDENT>node_sizes = graph.vs[node_sizes]<EOL><DEDENT>else:<EOL><INDENT>node_sizes = list(node_sizes)<EOL><DEDENT><DEDENT>self._partition = _c_louvain._new_RBERVertexPartition(pygraph_t,<EOL>initial_membership, weights, node_sizes, resolution_parameter)<EOL>self._update_internal_membership()<EOL>
Parameters
----------
graph : :class:`ig.Graph`
  Graph to define the partition on.

initial_membership : list of int
  Initial membership for the partition. If :obj:`None` then defaults to a
  singleton partition.

weights : list of double, or edge attribute
  Weights of edges. Can be either an iterable or an edge attribute.

node_sizes : list of int, or vertex attribute
  Sizes of nodes are necessary to know the size of communities in aggregate
  graphs. Usually this is set to 1 for all nodes, but in specific cases
  this could be changed.

resolution_parameter : double
  Resolution parameter.