parameters: (in_filename, out_filename, upgrader)
return_statement: return files_processed, report_text, errors
docstring: Process a file of type `.py` or `.ipynb`.
docstring_summary: Process a file of type `.py` or `.ipynb`.
docstring_tokens: Process a file of type . py or . ipynb .
function: def process_file(in_filename, out_filename, upgrader):
    """Process a file of type `.py` or `.ipynb`."""
  
    if six.ensure_str(in_filename).endswith(".py"):
      files_processed, report_text, errors = \
        upgrader.process_file(in_filename, out_filename)
    elif six.ensure_str(in_filename).endswith(".ipynb"):
      files_processed, report_text, errors = \
        ipynb.process_file(in_filename, out_filename, upgrader)
    else:
      raise NotImplementedError(
          "Currently converter only supports python or ipynb")
  
    return files_processed, report_text, errors
function_tokens: def process_file ( in_filename , out_filename , upgrader ) : if six . ensure_str ( in_filename ) . endswith ( ".py" ) : files_processed , report_text , errors = upgrader . process_file ( in_filename , out_filename ) elif six . ensure_str ( in_filename ) . endswith ( ".ipynb" ) : files_processed , report_text , errors = ipynb . process_file ( in_filename , out_filename , upgrader ) else : raise NotImplementedError ( "Currently converter only supports python or ipynb" ) return files_processed , report_text , errors