public static function runScope(ContainerInterface $container, callable $scope)
    {
        list ($previous, self::$container) = [self::$container, $container];
        try {
            return $scope();
        } catch (\Throwable $e) {
            throw $e;
        } finally {
            self::$container = $previous;
        }
    }