parameters: (powermonitor_output)
return_statement: return out_dict
docstring: Parse the output of of the samples collector process.
  
      Returns:
          Dictionary in the format returned by StopMonitoringPowerAsync().
docstring_summary: Parse the output of of the samples collector process.
docstring_tokens: Parse the output of of the samples collector process .
function: def ParseSamplingOutput(powermonitor_output):
      """Parse the output of of the samples collector process.
  
      Returns:
          Dictionary in the format returned by StopMonitoringPowerAsync().
      """
      power_samples = []
      total_energy_consumption_mwh = 0
      result = json.loads(powermonitor_output)
      timedelta_h = result['duration_s'] / len(result['samples']) / 3600
      for (current_a, voltage_v) in result['samples']:
        energy_consumption_mw = current_a * voltage_v * 10**3
        total_energy_consumption_mwh += energy_consumption_mw * timedelta_h
        power_samples.append(energy_consumption_mw)
      # -------- Collect and Process Data -------------
      out_dict = {}
      # Raw power usage samples.
      out_dict['identifier'] = 'monsoon'
      out_dict['power_samples_mw'] = power_samples
      out_dict['energy_consumption_mwh'] = total_energy_consumption_mwh
  
      return out_dict
function_tokens: def ParseSamplingOutput ( powermonitor_output ) : power_samples = [ ] total_energy_consumption_mwh = 0 result = json . loads ( powermonitor_output ) timedelta_h = result [ 'duration_s' ] / len ( result [ 'samples' ] ) / 3600 for ( current_a , voltage_v ) in result [ 'samples' ] : energy_consumption_mw = current_a * voltage_v * 10 ** 3 total_energy_consumption_mwh += energy_consumption_mw * timedelta_h power_samples . append ( energy_consumption_mw ) # -------- Collect and Process Data ------------- out_dict = { } # Raw power usage samples. out_dict [ 'identifier' ] = 'monsoon' out_dict [ 'power_samples_mw' ] = power_samples out_dict [ 'energy_consumption_mwh' ] = total_energy_consumption_mwh return out_dict