    def mapping(path: str) -> str:
        """
        Mapping the path(endswith']'), like repo[framework] to repo-framework.

        Args:
            path (`str`):
                The path to the uri.

        Returns:
            (`str`)
                Check if passed.

        Raises:
            (`ValueError`)
                Raise error when the path does not match the format.
        """
        try:
            if not path.endswith(']'):
                raise ValueError
            repo, framework = path.strip(']').split('[')
            path = f'{repo}-{framework}'
            return path
        except ValueError:
            raise ValueError(f'{path} does not match the \'[/author/]repo-name[framework]\' format!') from ValueError
Mapping the path(endswith']'), like repo[framework] to repo-framework.

Args:
path (`str`):
The path to the uri.

Returns:
(`str`)
Check if passed.

Raises:
(`ValueError`)
Raise error when the path does not match the format.
towhee/utils/repo_normalize.py