def _scope_repr(scope_obj):
    """Uses laurelin constant name representation for scope"""
    try:
        intval = int(scope_obj)
        name = scope_obj.namedValues.getName(intval)
        if name == 'wholeSubtree':
            return 'Scope.SUB'
        elif name == 'singleLevel':
            return 'Scope.ONE'
        elif name == 'baseObject':
            return 'Scope.BASE'
        else:
            return '{0}({1})'.format(scope_obj.__class__.__name__, repr(name))
    except Exception:
        return '{0}(<schema object>)'.format(scope_obj.__class__.__name__)
