for c in set(input_left + input_right):
// can"t deal with repeated indices on same input or more than 2 totalnl, nr = input_left.count(c), input_right.count(c)if (nl > 1) or (nr > 1) or (nl + nr > 2):
return False
// can"t do implicit summation or dimension collapse e.g.