def pin_spec(r: requirements.Requirement) -> requirements.Requirement:
    """
    Pin the requirement to the version assuming it is lower bounded by a
    version.
    """

    spec = str(r)
    if ">=" not in spec:
        raise ValueError(f"Requirement {spec} is not lower-bounded.")

    spec = spec.replace(">=", "==")
    return requirements.Requirement(spec)

    Pin the requirement to the version assuming it is lower bounded by a
    version.
    
src/core/trulens/core/utils/imports.py