[ONNX] Clean up patch functions (#83136)
Changes:
- Move namespace handling from `_new_node` to `_graph_op` for clarity
- Always require the `aten` namespace when creating aten ops. Remove the `aten` argument supplied in `_aten_op` for clarity
- Rename the `_ATTR_PATTERN` global
- Improve types
- Update `_add_attribute` to raise ValueErrors
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83136
Approved by: https://github.com/BowenBao