def freeze(
        self, flag: Union[Feature, str], *, value: Optional[bool] = None
    ) -> bool:
        """Lock the given feature flag to the given value.

        If the value is not provided, freeze the flag to its current value.

        Raises:
            ValueError: If the flag has already been frozen to a different value.
        """

        return self.set(flag, value=value, freeze=True)
Lock the given feature flag to the given value.

        If the value is not provided, freeze the flag to its current value.

        Raises:
            ValueError: If the flag has already been frozen to a different value.
        
src/core/trulens/core/experimental/__init__.py