def normalized_name(dist: Distribution) -> Optional[str]:
    """
    Honor name normalization for distributions that don't provide ``_normalized_name``.
    """
    try:
        return dist._normalized_name
    except AttributeError:
        from . import Prepared  # -> delay to prevent circular imports.

        return Prepared.normalize(getattr(dist, "name", None) or dist.metadata['Name'])

    Honor name normalization for distributions that don't provide ``_normalized_name``.
    
product/gradle-plugin/src/main/python/setuptools/_vendor/importlib_metadata/_py39compat.py