def set_membership(self, membership):
    """ Set membership. """
    _c_leiden._MutableVertexPartition_set_membership(self._partition, list(membership))
    self._update_internal_membership()
def set_membership ( self , membership ) : _c_leiden . _MutableVertexPartition_set_membership ( self . _partition , list ( membership ) ) self . _update_internal_membership ( )
Set membership.