tools/resources/list_unused_grit_header.py
def FindNodeWithTag(node, tag):
  """Look through a node's children for a child node with a given tag.

  Args:
    root: The node to examine.
    tag: The tag on a child node to look for.

  Returns:
    A child node with the given tag, or None.
  """
  result = None
  for n in node.getchildren():
    if n.tag == tag:
      assert not result
      result = n
  return result
Look through a node's children for a child node with a given tag.

  Args:
    root: The node to examine.
    tag: The tag on a child node to look for.

  Returns:
    A child node with the given tag, or None.
  
Look through a node's children for a child node with a given tag.
Look through a node ' s children for a child node with a given tag .
def FindNodeWithTag(node, tag):
  result = None
  for n in node.getchildren():
    if n.tag == tag:
      assert not result
      result = n
  return result
def FindNodeWithTag ( node , tag ) : result = None for n in node . getchildren ( ) : if n . tag == tag : assert not result result = n return result
Look through a node's children for a child node with a given tag.
Look through a node ' s children for a child node with a given tag .
"""Look through a node's children for a child node with a given tag.

  Args:
    root: The node to examine.
    tag: The tag on a child node to look for.

  Returns:
    A child node with the given tag, or None.
  """
A child node with the given tag, or None.
A child node with the given tag or None .
node
tag
The tag on a child node to look for.
The tag on a child node to look for .
root
The node to examine.
The node to examine .