parameters: (source, fixer_names, ignore=None)
return_statement: return new_text
docstring: Return refactored code using lib2to3.
  
      Skip if ignore string is produced in the refactored code.
docstring_summary: Return refactored code using lib2to3.
docstring_tokens: Return refactored code using lib2to3 .
function: def refactor(source, fixer_names, ignore=None):
      """Return refactored code using lib2to3.
  
      Skip if ignore string is produced in the refactored code.
  
      """
      from lib2to3 import pgen2
      try:
          new_text = refactor_with_2to3(source,
                                        fixer_names=fixer_names)
      except (pgen2.parse.ParseError,
              SyntaxError,
              UnicodeDecodeError,
              UnicodeEncodeError):
          return source
  
      if ignore:
          if ignore in new_text and ignore not in source:
              return source
  
      return new_text
function_tokens: def refactor ( source , fixer_names , ignore = None ) : from lib2to3 import pgen2 try : new_text = refactor_with_2to3 ( source , fixer_names = fixer_names ) except ( pgen2 . parse . ParseError , SyntaxError , UnicodeDecodeError , UnicodeEncodeError ) : return source if ignore : if ignore in new_text and ignore not in source : return source return new_text