Is there a library function to fit an identity-link NB1 regression model?

I would like to build an identity link negative binomial 1 glm model for some data (where negative binomial 1 means that the dispersion parameter is of the form (1 + theta)*mean). This means I need to simultaneously control both the link function form and the dispersion parameter form.

Is there a library/function I can use to control both?

More generally, I’d be happy if I could specify both a link function and an arbitrary form of the dispersion, only needing to supply the dispersion parameter theta.

I’m not sure if there is anything pre-packaged to fit something like this, but I’m sure this can easily be written with Turing.