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 format_log(self, log, in_filename):
      log_string = "%d:%d: %s: %s" % (log[1], log[2], log[0], log[3])
      if in_filename:
          return in_filename + ":" + log_string
      else:
          return log_string
  
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 3 for calling the ASTCodeUpgrader obj's underlying member method code with example usage: obj.format_log(log, in_filename) and returns: unknown, log_string