def unique_slug_required(form, slug):

    if hasattr(form, 'instance') and form.instance.id:
        if Content.objects.exclude(page=form.instance).filter(
            body=slug, type="slug").count():
            raise forms.ValidationError(error_dict['another_page_error'])
    elif Content.objects.filter(body=slug, type="slug").count():
        raise forms.ValidationError(error_dict['another_page_error'])
    return slug
Tests that requires for used methods on classes are extra.
dataset/ETHPy150Open batiste/django-page-cms/pages/admin/forms.py/unique_slug_required--crossover with--dataset/ETHPy150Open google/closure-linter/closure_linter/closurizednamespacesinfo_test.py/ClosurizedNamespacesInfoTest.testIsExtraRequire_usedIdentifier