fromtypingimportOptionalfrompip._internal.distributions.baseimportAbstractDistributionfrompip._internal.index.package_finderimportPackageFinderfrompip._internal.metadataimportBaseDistributionclassInstalledDistribution(AbstractDistribution):"""Represents an installed package.
This does not need any preparation as the required information has already
been computed.
"""@propertydefbuild_tracker_id(self)->Optional[str]:returnNonedefget_metadata_distribution(self)->BaseDistribution:assertself.req.satisfied_byisnotNone, "not actually installed"returnself.req.satisfied_bydefprepare_distribution_metadata(self,finder:PackageFinder,build_isolation:bool,check_build_deps:bool,)->None:pass