Use types.union when finding common super type of unrelated types
Add missing module