parameters: (log_filenames, logger)
return_statement: return device_logs
docstring: Read log files, combine and format.
  
    Args:
      log_filenames: mapping of device_id to sorted list of file paths
      logger: logger handle for logging events
  
    Returns:
      list of formatted device logs, one for each device.
docstring_summary: Read log files, combine and format.
docstring_tokens: Read log files combine and format .
function: def GetDeviceLogs(log_filenames, logger):
    """Read log files, combine and format.
  
    Args:
      log_filenames: mapping of device_id to sorted list of file paths
      logger: logger handle for logging events
  
    Returns:
      list of formatted device logs, one for each device.
    """
    device_logs = []
  
    for device, device_files in log_filenames.items():
      logger.debug('%s: %s', device, str(device_files))
      device_file_lines = []
      for cur_file in device_files:
        with open(cur_file) as f:
          device_file_lines += [(cur_file, f.read().splitlines())]
      combined_lines = CombineLogFiles(device_file_lines, logger)
      # Prepend each line with a short unique ID so it's easy to see
      # when the device changes.  We don't use the start of the device
      # ID because it can be the same among devices.  Example lines:
      # AB324:  foo
      # AB324:  blah
      device_logs += [('\n' + device[-5:] + ':  ').join(combined_lines)]
    return device_logs
function_tokens: def GetDeviceLogs ( log_filenames , logger ) : device_logs = [ ] for device , device_files in log_filenames . items ( ) : logger . debug ( '%s: %s' , device , str ( device_files ) ) device_file_lines = [ ] for cur_file in device_files : with open ( cur_file ) as f : device_file_lines += [ ( cur_file , f . read ( ) . splitlines ( ) ) ] combined_lines = CombineLogFiles ( device_file_lines , logger ) # Prepend each line with a short unique ID so it's easy to see # when the device changes.  We don't use the start of the device # ID because it can be the same among devices.  Example lines: # AB324:  foo # AB324:  blah device_logs += [ ( '\n' + device [ - 5 : ] + ':  ' ) . join ( combined_lines ) ] return device_logs