Type hinting when multiple types are in input and output but in 1-to-1 relation between them