tools/metrics/histograms/populate_enums.py
def PopulateEnumsWithUkmEvents(doc, enums, ukm_events):
  """Populates enum nodes in the enums with a list of ukm events

  Args:
    doc: The document to create the node in.
    enums: The enums node to be iterated.
    ukm_events: A list of ukm event nodes.
  """
  for enum in extract_histograms.IterElementsWithTag(enums, 'enum', 1):
    # We only special case 'UkmEventNameHash' currently.
    if enum.getAttribute('name') == 'UkmEventNameHash':
      PopulateEnumWithUkmEvents(doc, enum, ukm_events)
Populates enum nodes in the enums with a list of ukm events

  Args:
    doc: The document to create the node in.
    enums: The enums node to be iterated.
    ukm_events: A list of ukm event nodes.
  
Populates enum nodes in the enums with a list of ukm events
Populates enum nodes in the enums with a list of ukm events
def PopulateEnumsWithUkmEvents(doc, enums, ukm_events):
  for enum in extract_histograms.IterElementsWithTag(enums, 'enum', 1):
    if enum.getAttribute('name') == 'UkmEventNameHash':
      PopulateEnumWithUkmEvents(doc, enum, ukm_events)
def PopulateEnumsWithUkmEvents ( doc , enums , ukm_events ) : for enum in extract_histograms . IterElementsWithTag ( enums , 'enum' , 1 ) : if enum . getAttribute ( 'name' ) == 'UkmEventNameHash' : PopulateEnumWithUkmEvents ( doc , enum , ukm_events )
Populates enum nodes in the enums with a list of ukm events
Populates enum nodes in the enums with a list of ukm events
"""Populates enum nodes in the enums with a list of ukm events

  Args:
    doc: The document to create the node in.
    enums: The enums node to be iterated.
    ukm_events: A list of ukm event nodes.
  """ # We only special case 'UkmEventNameHash' currently.
doc
The document to create the node in.
The document to create the node in .
enums
The enums node to be iterated.
The enums node to be iterated .
ukm_events
A list of ukm event nodes.
A list of ukm event nodes .