def METHOD_NAME(track):
    # @test
    unregister_encoding = (
    # @end
    register_path_decoding(
        user_pk=User,
        user_username=User.username,
        user_email=User.email,
        track_foo=lambda string, request, decoded_kwargs, kwargs, **_: Track.objects.get(name__iexact=string.strip())
    )
    # @test
    )
    unregister_encoding.__enter__()
    # @end
    # language=rst
    """
    This will allow you to do `<user_pk>`, `<user_username>`, `<user_email>` in your url pattern for the `User` model, and `track_foo` for the `Track` model.  
    The first example just maps `pk`, `username` and `email` one to one to the model. So for an email lookup it will run `User.objects.get(email=params.email)` to get the `User` object. 
    The second example is for more complex use cases. As you have access to `request`, `decoded_kwargs` and `kwargs` in addition to the model you can perform path decoding that is not possible with Django path decoders. 
    """
    # @test
    user = User.objects.create(pk=11, username='tony', email='tony@example.com')
    result = decode_path_components(request=req('get'), user_email='tony@example.com', track_foo='  neoN kNights\n \t ')
    assert result['user'] == user
    assert result['track_foo'] == track
    unregister_encoding.__exit__(None, None, None)
    # @end