def METHOD_NAME(in_filename, out_filename, upgrader):
  """Process a file of type `.py` or `.ipynb`."""
  if in_filename.endswith(".py"):
    files_processed, report_text, errors = \
      upgrader.METHOD_NAME(in_filename, out_filename)
  elif in_filename.endswith(".ipynb"):
    files_processed, report_text, errors = \
      ipynb.METHOD_NAME(in_filename, out_filename, upgrader)
  else:
    raise NotImplementedError(
        "Currently converter only supports python or ipynb")
  return files_processed, report_text, errors