docs: def remove_redundant_items(items):
      # type: (List[AbstractType]) -> List[AbstractType]
      """Filter out redundant union items."""
      result = []
      for item in items:
          for other in items:
              if item is not other and is_redundant_union_item(item, other):
                  break
          else:
              result.append(item)
      return result