def _trim_zeros_complex(str_complexes, na_rep='<STR_LIT>'):
def separate_and_trim(str_complex, na_rep):<EOL><INDENT>num_arr = str_complex.split('<STR_LIT:+>')<EOL>return (_trim_zeros_float([num_arr[<NUM_LIT:0>]], na_rep) +<EOL>['<STR_LIT:+>'] +<EOL>_trim_zeros_float([num_arr[<NUM_LIT:1>][:-<NUM_LIT:1>]], na_rep) +<EOL>['<STR_LIT>'])<EOL><DEDENT>return ['<STR_LIT>'.join(separate_and_trim(x, na_rep)) for x in str_complexes]<EOL>
Separates the real and imaginary parts from the complex number, and
executes the _trim_zeros_float method on each of those.