# Path: mutant/compat.py
# def get_remote_field_model(field):
# def get_opts_label(opts):
# def many_to_many_set(instance, m2m, value):
# def get_remote_field_model(field):
# def get_opts_label(opts):
# def many_to_many_set(instance, m2m, value):


from collections import defaultdict
from contextlib import contextmanager
from copy import deepcopy
from itertools import chain, groupby
from operator import itemgetter
from django.apps import AppConfig, apps
from django.db import connections, models, router
from django.utils import six
from django.utils.encoding import force_text
from django.utils.functional import lazy
from .compat import get_remote_field, get_remote_field_model
from __future__ import unicode_literals





def allow_migrate(model):
    for db in connections:
        if router.allow_migrate(db, model):
            yield db


NOT_PROVIDED = object()



# Path: mutant/compat.py
# def get_remote_field_model(field):
# def get_opts_label(opts):
# def many_to_many_set(instance, m2m, value):
# def get_remote_field_model(field):
# def get_opts_label(opts):
# def many_to_many_set(instance, m2m, value):


# Path: mutant/utils.py
from collections import defaultdict
from contextlib import contextmanager
from copy import deepcopy
from itertools import chain, groupby
from operator import itemgetter
from django.apps import AppConfig, apps
from django.db import connections, models, router
from django.utils import six
from django.utils.encoding import force_text
from django.utils.functional import lazy
from .compat import get_remote_field, get_remote_field_model

from __future__ import unicode_literals





def allow_migrate(model):
    for db in connections:
        if router.allow_migrate(db, model):
            yield db


NOT_PROVIDED = object()



def popattr(obj, attr, default=NOT_PROVIDED):