For solving #285 I have written some helper functions that extract the different program blocks of the `stancode` generated for a `bmmodel` To keep code review manageable I have separated this into its own issue.