code: def combine_types(types):
      # type: (Iterable[AbstractType]) -> AbstractType
      
      items = simplify_types(types)
      if len(items) == 1:
          return items[0]
      else:
          return UnionType(items)
docs: Given some types, return a combined and simplified type.
  
      For example, if given 'int' and 'List[int]', return Union[int, List[int]]. If given
      'int' and 'int', return just 'int'.