static Map pairToTwoElementMap(A key1, A key2, Pair pair) { ret pair == null ? null : litorderedmap(key1 := pair.a, key2 := pair.b); }