def check_state_override(self, request, state):
        if request.COOKIES.get(settings.REPLICATED_FORCE_MASTER_COOKIE_NAME) == 'true':
            return 'master'

        overrides = settings.REPLICATED_VIEWS_OVERRIDES

        if overrides:
            match = urlresolvers.resolve(request.path_info)

            import_path = '%s.%s' % (get_object_name(inspect.getmodule(match.func)),
                                     get_object_name(match.func))

            for lookup_view, forced_state in six.iteritems(overrides):
                if match.url_name == lookup_view or import_path == lookup_view:
                    state = forced_state
                    break

        return state
Inheritance from local context with variable parent template
dataset/ETHPy150Open yandex/django_replicated/django_replicated/middleware.py/ReplicationMiddleware.check_state_override--crossover with--dataset/ETHPy150Open django/django/tests/template_tests/syntax_tests/test_extends.py/InheritanceTests.test_inheritance25