def normalize_path(path: Any) -> str:
    """Normalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    """
    str_path = str(path)
    parent, file_name = os.path.split(str_path)
    if parent:
        raise ValueError(f'{path!r} must be only a file name')
    return file_name
Normalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    
product/gradle-plugin/src/main/python/setuptools/_vendor/importlib_resources/_legacy.py