def METHOD_NAME(self, scope_name):
    if context.result is None:
        in_failure = in_interruption = False
    else:
        in_failure = not context.result.is_success(allow_skips=True)
        in_interruption = context.result.is_interrupted()
    _logger.trace('CleanupManager: popping scope {0!r} (failure: {1}, interrupt: {2})', scope_name, in_failure, in_interruption)
    scope = self._scope_stack[-1]
    if scope.name != scope_name:
        raise SlashInternalError('Attempted to pop scope {!r}, but current scope is {!r}'.format(scope_name, scope.name))
    try:
        self.call_cleanups(
            scope=scope,
            in_failure=in_failure, in_interruption=in_interruption)
    finally:
        self._scope_stack.pop()
        self._scopes_by_name[scope_name].pop()