def METHOD_NAME(self) -> None:
    for req in self.requirements_to_install:
        version = req.get_dist().version
        if isinstance(version, LegacyVersion):
            deprecated(
                reason=(
                    f"pip has selected the non standard version {version} "
                    f"of {req}. In the future this version will be "
                    f"ignored as it isn't standard compliant."
                ),
                replacement=(
                    "set or update constraints to select another version "
                    "or contact the package author to fix the version number"
                ),
                issue=12063,
                gone_in="23.3",
            )
        for dep in req.get_dist().iter_dependencies():
            if any(isinstance(spec, LegacySpecifier) for spec in dep.specifier):
                deprecated(
                    reason=(
                        f"pip has selected {req} {version} which has non "
                        f"standard dependency specifier {dep}. "
                        f"In the future this version of {req} will be "
                        f"ignored as it isn't standard compliant."
                    ),
                    replacement=(
                        "set or update constraints to select another version "
                        "or contact the package author to fix the version number"
                    ),
                    issue=12063,
                    gone_in="23.3",
                )