def get_model_compat(app_label, model_name):
    try:
        # django >= 1.7
        from django.apps import apps
        return apps.get_model(app_label, model_name)
    except ImportError:
        from django.db.models import get_model
        return get_model(app_label, model_name)
Compute chunk bounds from text file according to start_re and end_re:
dataset/ETHPy150Open django-extensions/django-extensions/django_extensions/compat.py/get_model_compat--crossover with--dataset/ETHPy150Open kmike/opencorpora-tools/opencorpora/xml_utils.py/bounds