#NEWLINE# @ grid_sizes . implementation ( Addition , Subtraction , Multiplication , Division ) #NEWLINE# def operation_grid_sizes( binop ) : #NEWLINE# #INDENT# left_grid_sizes = grid_sizes ( binop . left ) #NEWLINE# right_grid_sizes = grid_sizes ( binop . right ) #NEWLINE# binop . grid_sizes = best_grid_sizes = left_grid_sizes . intersection ( right_grid_sizes ) #NEWLINE# if ( len ( best_grid_sizes ) == 0 ) : #NEWLINE# #INDENT# binop . grid_size_error = MismatchedGridSize ( ( binop , left_grid_sizes , right_grid_sizes ) ) #NEWLINE# #UNINDENT# return binop . grid_sizes