code: def check_copies(overwrite: bool = False, file: str = None):
      """
      Check every file is copy-consistent with the original. Also check the model list in the main README and other
      READMEs are consistent.
  
      Args:
          overwrite (`bool`, *optional*, defaults to `False`):
              Whether or not to overwrite the copies when they don't match.
          file (`bool`, *optional*):
              The path to a specific file to check and/or fix.
      """
      buffer = {}
  
      if file is None:
          all_files = glob.glob(
              os.path.join(TRANSFORMERS_PATH, "**/*.py"), recursive=True
          )
          all_test_files = glob.glob(
              os.path.join(MODEL_TEST_PATH, "**/*.py"), recursive=True
          )
          all_files = list(all_files) + list(all_test_files)
      else:
          all_files = [file]
  
      diffs = []
      for filename in all_files:
          new_diffs = is_copy_consistent(filename, overwrite, buffer)
          diffs += [
              f"- {filename}: copy does not match {d[0]} at line {d[1]}"
              for d in new_diffs
          ]
      if not overwrite and len(diffs) > 0:
          diff = "\n".join(diffs)
          raise Exception(
              "Found the following copy inconsistencies:\n"
              + diff
              + "\nRun `make fix-copies` or `python utils/check_copies.py --fix_and_overwrite` to fix them."
          )
      check_model_list_copy(overwrite=overwrite)
  
imports: import argparse
  import glob
  import os
  import re
  import subprocess
  from collections import OrderedDict
  from typing import List, Optional, Tuple, Union
  from transformers.utils import direct_transformers_import
label_desc: Use image node_id 14 for calling a global function with example usage: check_copies(overwrite, file) without return types