def METHOD_NAME(self, app, name="", auth_token=None, **extra_fields):
    """Create an app token with the given name."""
    if not auth_token:
        auth_token = generate_token()
    app_token = self.model(app=app, name=name, **extra_fields)
    app_token.set_auth_token(auth_token)
    app_token.save()
    return app_token, auth_token