engine:
engine:

Made `get_or_create_input` a bit more dry (rearranged some duplicated
code).


Former-commit-id: b22e193a0808e6e205c37dd860694527c2bf5d4e [formerly b22e193a0808e6e205c37dd860694527c2bf5d4e [formerly 63ba766627c57c791e0327802197db06a16b1734]]
Former-commit-id: 2c9cb9086943e04c68f381c59748e9a643e19060
Former-commit-id: f07d74ca87ec6e7e2513854be55a5b9e9635bf57
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine