text: # uncompyle6 version 2.9.10
  # Python bytecode 2.7 (62211)
  # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) 
  # [GCC 6.2.0 20161005]
  # Embedded file name: fix_reduce.py
  """Fixer for reduce().
  
  Makes sure reduce() is imported from the functools module if reduce is
  used in that module.
  """
  from lib2to3 import fixer_base
  from lib2to3.fixer_util import touch_import
  
  class FixReduce(fixer_base.BaseFix):
      BM_compatible = True
      order = 'pre'
      PATTERN = "\n    power< 'reduce'\n        trailer< '('\n            arglist< (\n                (not(argument<any '=' any>) any ','\n                 not(argument<any '=' any>) any) |\n                (not(argument<any '=' any>) any ','\n                 not(argument<any '=' any>) any ','\n                 not(argument<any '=' any>) any)\n            ) >\n        ')' >\n    >\n    "
  
      def transform(self, node, results):
          touch_import('functools', 'reduce', node)