def METHOD_NAME(counter_element, covered_adjustment=0):
  """Turns a JaCoCo <counter> element into an llvm-cov totals entry."""
  summary = {}
  covered = covered_adjustment
  missed = 0
  if counter_element is not None:
    covered += int(counter_element.attrib['covered'])
    missed += int(counter_element.attrib['missed'])
  summary['covered'] = covered
  summary['notcovered'] = missed
  summary['count'] = summary['covered'] + summary['notcovered']
  if summary['count'] != 0:
    summary['percent'] = (100.0 * summary['covered']) / summary['count']
  else:
    summary['percent'] = 0
  return summary