def _FixUnits(metric_name, units, values):
  """Fix units and metric name with values if required.

  Args:
    metric_name: origin metric name
    units: raw trimmed units
    values: origin values

  Returns:
    (metric_name, units, values) triple with fixed content
  """
  if units == 'bps':
    return metric_name, 'bytesPerSecond', [v / 8.0 for v in values]
  elif units == 'dB':
    return metric_name + '_dB', 'unitless', values
  elif units == 'fps':
    return metric_name + '_fps', 'Hz', values
  elif units == 'frames':
    return metric_name, 'count', values
  elif units == 'ms':
    return metric_name, 'msBestFitFormat', values
  elif units == '%':
    return metric_name + '_%', 'unitless', values
  else:
    return metric_name, units, values