tools/metrics/histograms/suffixes_to_variants.py
def _GetBaseVariant(doc, histogram):
  """Returns a <variant> node whose name is an empty string as the base variant.

  If histogram has attribute `base = True`, it means that the base histogram
  should be marked as obsolete.

  Args:
    doc: A Document object which is used to create a new <variant> node.
    histogram: The <histogram> node to check whether its base is true or not.

  Returns:
     A <variant> node.
  """
  is_base = False
  if histogram.hasAttribute('base'):
    is_base = histogram.getAttribute('base').lower() == 'true'
    histogram.removeAttribute('base')
  base_variant = doc.createElement('variant')
  base_variant.setAttribute('name', '')
  if is_base:
    base_obsolete_node = doc.createElement('obsolete')
    base_obsolete_node.appendChild(
        doc.createTextNode(
            extract_histograms.DEFAULT_BASE_HISTOGRAM_OBSOLETE_REASON))
    base_variant.appendChild(base_obsolete_node)
  return base_variant
Returns a <variant> node whose name is an empty string as the base variant.

  If histogram has attribute `base = True`, it means that the base histogram
  should be marked as obsolete.

  Args:
    doc: A Document object which is used to create a new <variant> node.
    histogram: The <histogram> node to check whether its base is true or not.

  Returns:
     A <variant> node.
  
Returns a  node whose name is an empty string as the base variant.
If histogram has attribute `base = True`, it means that the base histogram
should be marked as obsolete.
Returns a node whose name is an empty string as the base variant . If histogram has attribute ` base = True ` it means that the base histogram should be marked as obsolete .
def _GetBaseVariant(doc, histogram):
  is_base = False
  if histogram.hasAttribute('base'):
    is_base = histogram.getAttribute('base').lower() == 'true'
    histogram.removeAttribute('base')
  base_variant = doc.createElement('variant')
  base_variant.setAttribute('name', '')
  if is_base:
    base_obsolete_node = doc.createElement('obsolete')
    base_obsolete_node.appendChild(
        doc.createTextNode(
            extract_histograms.DEFAULT_BASE_HISTOGRAM_OBSOLETE_REASON))
    base_variant.appendChild(base_obsolete_node)
  return base_variant
def _GetBaseVariant ( doc , histogram ) : is_base = False if histogram . hasAttribute ( 'base' ) : is_base = histogram . getAttribute ( 'base' ) . lower ( ) == 'true' histogram . removeAttribute ( 'base' ) base_variant = doc . createElement ( 'variant' ) base_variant . setAttribute ( 'name' , '' ) if is_base : base_obsolete_node = doc . createElement ( 'obsolete' ) base_obsolete_node . appendChild ( doc . createTextNode ( extract_histograms . DEFAULT_BASE_HISTOGRAM_OBSOLETE_REASON ) ) base_variant . appendChild ( base_obsolete_node ) return base_variant
Returns a <variant> node whose name is an empty string as the base variant.
Returns a <variant > node whose name is an empty string as the base variant .
"""Returns a <variant> node whose name is an empty string as the base variant.

  If histogram has attribute `base = True`, it means that the base histogram
  should be marked as obsolete.

  Args:
    doc: A Document object which is used to create a new <variant> node.
    histogram: The <histogram> node to check whether its base is true or not.

  Returns:
     A <variant> node.
  """
None
doc
A Document object which is used to create a new  node.
A Document object which is used to create a new node .
histogram
The  node to check whether its base is true or not.
The node to check whether its base is true or not .