def METHOD_NAME(self, obj):
    """
    Get latest version.
    """
    rv = obj.versions.filter(is_highest=True).first()
    href = reverse(
        "v2-collection-versions-detail",
        kwargs={
            "path": self.context["path"],
            "namespace": obj.namespace,
            "name": obj.name,
            "version": rv.version,
        },
    )
    return {"href": href, "version": rv.version}