def extract_views_from_urlpatterns(urlpatterns, base=''):
    views = []
    for p in urlpatterns:
        if hasattr(p, 'url_patterns'):
            try:
                patterns = p.url_patterns
            except ImportError:
                continue
            views.extend(extract_views_from_urlpatterns(patterns, base + p.regex.pattern))
        elif hasattr(p, 'callback'):
            try:
                views.append((p.callback, base + p.regex.pattern))
            except ViewDoesNotExist:
                continue
        else:
            raise TypeError(_("%s does not appear to be a urlpattern object") % p)
    return views
Check for assertEqual(type(A), B) sentences
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/admindocs/views.py/extract_views_from_urlpatterns--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/hacking/checks.py/assert_equal_type