@classmethod
def get_unique_path_from_urlpath(cls, url_path):
    """
        Returns a unique path derived from the given url path taken from a Page object.

        We never change paths, even if a page has been moved in order to not confuse Pontoon.

        But this means that if pages are moved and a new one is created with the same slug in
        it's previous position, a path name clash could occur.
        """
    path = url_path.strip('/')
    path_suffix = 1
    try_path = path
    while cls.objects.filter(path=try_path).exists():
        try_path = f'{path}-{path_suffix}'
        path_suffix += 1
        if path_suffix > 100:
            raise Exception(f'Unable to find a unique path for: {url_path}')
    return try_path
