Transformers Generalize DeepSets and Can be Extended to Graphs & Hypergraphs