def duplicate_identical_ops(ops):
 for i in range(len(ops)):
  for j in range((i + 1), len(ops)):
   if (ops[i] == ops[j]):
    ops[j] = ops[i].duplicate()

def duplicate_identical_ops ( ops ) : for i in range ( len ( ops ) ) : for j in range ( ( i + 1 ) , len ( ops ) ) : if ( ops [ i ] == ops [ j ] ) : ops [ j ] = ops [ i ] . duplicate ( )
duplicate identical trainop .