def resolve(self, resource):
        embed_value = resource.stored_object.checkout.pk
        kwargs = {self.lookup_url_kwarg: embed_value}
        return resolve(
            reverse(
                self.view_name,
                kwargs=kwargs
            )
        )
Resolves the view when embedding.
dataset/ETHPy150Open CenterForOpenScience/osf.io/api/files/serializers.py/CheckoutField.resolve