Fix immediate output getattr
Fixes #2538.
Changed remove_getattr_nodes() such that it adds a new constant op if it encounters a getattr op that is part of the graph's output. Before it raised an error wich caused some networks not to convert.
Added a unit test for the scenario.
@tritolol thanks for the pull request. I apologize that no one seems to have looked at this. Please rebase this change on top of tip of main. Then I will kick off a CI run.
@TobyRoseman I'm not sure if you are automatically notified, so just in case you are not: The rebase is done.
Thanks @tritolol. CI: https://gitlab.com/coremltools1/coremltools/-/pipelines/1978748030
@TobyRoseman are any of the failing tests related to this PR? There is no indication of that for me.
@tritolol - I don't think those failures are related to this change. Please rebase this change on top the latest main.