ofc@sOdZddlmZddlmZmZmZdejfdYZdS(sA Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) i(t fixer_base(t BlankLinetsymsttokentFixItertoolsImportscBs$eZeZdeZdZRS(sT import_from< 'from' 'itertools' 'import' imports=any > c Cs|d}|jtjks&|j r2|g}n |j}x|dddD]}|jtjkry|j}|}n;|jtjkrdS|jtjkst|jd}|j}|dkrd|_|j qO|dkrO|j |d d kr d nd |_qOqOW|jp+|g}t } x=|D]5}| rf|jtj krf|j q;| t N} q;Wx0|r|d jtj kr|jj qwW|jpt|dd s|jdkr|j} t}| |_|SdS(Ntimportsiiuimapuizipuifilteru ifilterfalseu izip_longestiufu filterfalseu zip_longestitvalue(uimapuizipuifilter(u ifilterfalseu izip_longest(ttypeRtimport_as_nametchildrenRtNAMERtSTARtAssertionErrortNonetremovetchangedtTruetCOMMAtpoptgetattrtparenttprefixR( tselftnodetresultsRR tchildtmembert name_nodet member_namet remove_commatp((s;/usr/lib64/python2.7/lib2to3/fixes/fix_itertools_imports.pyt transformsD                 (t__name__t __module__Rt BM_compatibletlocalstPATTERNR(((s;/usr/lib64/python2.7/lib2to3/fixes/fix_itertools_imports.pyRs N( t__doc__tlib2to3Rtlib2to3.fixer_utilRRRtBaseFixR(((s;/usr/lib64/python2.7/lib2to3/fixes/fix_itertools_imports.pyts