def check_crontab(crontab_file, log, whitelisted_users=None):

  # Check if the file even exists.
  if not os.path.exists(crontab_file):
    return log.Summary()

  # Add the any specified users to the whitelist
  if whitelisted_users:
    USER_WHITELIST.update(whitelisted_users)

  # Check the file name.
  if re.search('[^A-Za-z0-9_-]', os.path.basename(crontab_file)):
    in_whitelist = False
    for pattern in FILE_RE_WHITELIST:
      if pattern.search(os.path.basename(crontab_file)):
        in_whitelist = True
        break
    if not in_whitelist:
      log.Warn('Cron will not process this file - its name must match'
               ' [A-Za-z0-9_-]+ .')

  line_no = 0
  cron_line_factory = CronLineFactory()
  with open(crontab_file, 'r') as crontab_f:
    for line in crontab_f:
      line = line.strip()
      line_no += 1

      cron_line = cron_line_factory.ParseLine(line)
      cron_line.ValidateAndLog(log)

      log.Emit(line_no, line)

  # Summarize the log messages if there were any.
  return log.Summary()
Rescue the given instance.
dataset/ETHPy150Open lyda/chkcrontab/chkcrontab_lib.py/check_crontab--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/compute/cells_api.py/ComputeCellsAPI.rescue