tools/metrics/histograms/split_xml.py
def _AggregateMinorNodes(node_dict):
  """Aggregates groups of nodes below threshold number into 'others'.

  Args:
    node_dict: A dictionary where the key is the prefix of the histogram/variant
        and value is a list of histogram/variant nodes.
  """
  others = node_dict.pop('others', [])

  for key, nodes in node_dict.items():
    # For a prefix, if the number of histograms is fewer than threshold,
    # aggregate into others.
    if len(nodes) < AGGREGATE_THRESHOLD:
      others.extend(nodes)
      del node_dict[key]

  if others:
    node_dict['others'] = others
Aggregates groups of nodes below threshold number into 'others'.

  Args:
    node_dict: A dictionary where the key is the prefix of the histogram/variant
        and value is a list of histogram/variant nodes.
  
Aggregates groups of nodes below threshold number into 'others'.
Aggregates groups of nodes below threshold number into ' others ' .
def _AggregateMinorNodes(node_dict):
  others = node_dict.pop('others', [])
  for key, nodes in node_dict.items():
    if len(nodes) < AGGREGATE_THRESHOLD:
      others.extend(nodes)
      del node_dict[key]
  if others:
    node_dict['others'] = others
def _AggregateMinorNodes ( node_dict ) : others = node_dict . pop ( 'others' , [ ] ) for key , nodes in node_dict . items ( ) : if len ( nodes ) < AGGREGATE_THRESHOLD : others . extend ( nodes ) del node_dict [ key ] if others : node_dict [ 'others' ] = others
Aggregates groups of nodes below threshold number into 'others'.
Aggregates groups of nodes below threshold number into ' others ' .
"""Aggregates groups of nodes below threshold number into 'others'.

  Args:
    node_dict: A dictionary where the key is the prefix of the histogram/variant
        and value is a list of histogram/variant nodes.
  """ # For a prefix, if the number of histograms is fewer than threshold, # aggregate into others.
node_dict
A dictionary where the key is the prefix of the histogram/variant
and value is a list of histogram/variant nodes.
A dictionary where the key is the prefix of the histogram / variant and value is a list of histogram / variant nodes .