public static function removeSegments($uri, int $key, int ... $keys)
    {
        $uri = self::filterUri($uri);

        return self::normalizePath($uri, (new HierarchicalPath($uri->getPath()))->withoutSegment($key, ...$keys));
    }