def METHOD_NAME(results, tests):
    tests_map = {t['name']: t for t in tests}
    login = tests_map.get('auto-login-action') or tests_map.get('login-action')
    job_result = tests_map['job']['result']
    result = login and login['result'] == 'pass' and job_result == 'pass'
    results['login'] = 'pass' if result else 'fail'