def add_global_view_imports(self, path):
        # from django.shortcuts import render, redirect, get_object_or_404, get_list_or_404
        import_list = list()

        with open(path, 'r') as import_file:
            need_import_shortcut = True
            need_import_urlresolvers = True
            need_import_users = True
            need_import_token = True
            need_import_JsonResponse = True

            for line in import_file.readlines():
                if 'from django.shortcuts import render, redirect, get_object_or_404' in line:
                    need_import_shortcut = False

                if line in 'from django.core.urlresolvers import reverse':
                    need_import_urlresolvers = False

                if 'from django.contrib.auth.models import User, Group' in line:
                    need_import_users = False

                if 'from django.middleware.csrf import get_token' in line:
                    need_import_token = False

                if 'from django_common.http import JsonResponse' in line:
                    need_import_JsonResponse = False

            if need_import_shortcut:
                import_list.append(
                    'from django.shortcuts import render, redirect, get_object_or_404')
            if need_import_urlresolvers:
                import_list.append('from django.core.urlresolvers import reverse')
            if need_import_users:
                import_list.append('from django.contrib.auth.models import User, Group')
            if need_import_token:
                import_list.append('from django.middleware.csrf import get_token')
            if need_import_JsonResponse:
                import_list.append('from django_common.http import JsonResponse')

        return import_list
dataset/ETHPy150Open Tivix/django-common/django_common/scaffold.py/Scaffold.add_global_view_imports/swapped operands of `in`