def METHOD_NAME(cls, ireq: InstallRequirement) -> "Constraint":
    links = frozenset([ireq.link]) if ireq.link else frozenset()
    return Constraint(ireq.specifier, ireq.hashes(trust_internet=False), links)