class_docstr: Handles upgrading a set of Python files using a given API change spec.
class_docstr_tok: ["Handles","upgrading","a","set","of","Python","files","using","a","given","API","change","spec","."]
code: def __init__(self, api_change_spec):
      if not isinstance(api_change_spec, APIChangeSpec):
          raise TypeError(
              "Must pass APIChangeSpec to ASTCodeUpgrader, got %s"
              % type(api_change_spec)
          )
      self._api_change_spec = api_change_spec
  
imports: import ast
  import collections
  import os
  import re
  import shutil
  import sys
  import tempfile
  import traceback
  import pasta
label_desc: Use image node_id 1 to create a new ASTCodeUpgrader object  with example: obj = ASTCodeUpgrader(api_change_spec)