def get_latest_versions_as_queryset(
        self, environment_id: int
    ) -> QuerySet["EnvironmentFeatureVersion"]:
        """
        Get the latest EnvironmentFeatureVersion objects for a given environment
        as a concrete QuerySet.

        Note that it is often required to return the proper QuerySet to carry out
        operations on the ORM object.
        """
        return self.filter(  # type: ignore[no-any-return]
            uuid__in=[
                efv.uuid
                for efv in self._get_latest_versions(environment_id=environment_id)
            ]
        )

        Get the latest EnvironmentFeatureVersion objects for a given environment
        as a concrete QuerySet.

        Note that it is often required to return the proper QuerySet to carry out
        operations on the ORM object.
        
api/features/versioning/managers.py