def METHOD_NAME(x):
  if not os.path.isfile(x):
    # Argparse uses the ArgumentTypeError to give a rejection message like:
    # error: argument input: x does not exist
    raise argparse.ArgumentTypeError('{0} does not exist'.format(x))
  return x