def METHOD_NAME(artist, album):
    # @test
    unregister_decoding = (
    # @end
    register_path_decoding(
        artist_name=Artist.name,
        artist_pk=Artist,
        album_pk=Album,
    )
    # @test
    )
    unregister_decoding.__enter__()
    class MyPage(Page):
        pass
    # @end
    # language=rst
    """
    Now in your path mapping you can write:
    """
    urlpatterns = [
        path('<artist_name>/<album_pk>/', MyPage().as_view()),
    ]
    # language=rst
    """
    ...and you will get an `Artist` instance in `params.artist` and an `Album`
    instance in `params.album`. The decoding will by default support
    `album_name` and `album_pk` if you register it like this. The name lookup
    assumes your name field is called `name` on the model. There's an advanced
    registration system for more complex lookups, but this should cover most
    usages.
    Use iommi decoders on a function based view
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    You can use the iommi path decoders on a normal FBV too:
    """
    @decode_path
    def my_view(request, artist, album):
        return artist, album
    # @test
    assert my_view(request, artist_pk=artist.pk, album_pk=album.pk) == (artist, album)
    # @end
    # language=rst
    """
    If you want to get any of the raw values before they are decoded you can access them
    via `request.iommi_view_params` which has both the undecoded and the decoded parameters.
    """
    # @test
    unregister_decoding.__exit__(None, None, None)
    # @end