tools/metrics/histograms/expand_owners.py
def _IsEmailOrPlaceholder(is_first_owner, owner_tag_text, histogram_name,
                          is_obsolete):
  """Returns true if owner_tag_text is an email or the placeholder text.

  Also, for histograms that are not obsolete, verifies that a histogram's first
  owner tag contains a valid primary owner.

  Args:
    is_first_owner: True if a histogram's first owner tag is being checked.
    owner_tag_text: The text of the owner tag being checked, e.g.
      'julie@google.com' or 'src/ios/net/cookies/OWNERS'.
    histogram_name: The string name of the histogram.
    is_obsolete: True if the histogram is obsolete.

  Raises:
    Error: Raised if (A) the text is from the first owner tag, (B) the histogram
    is not obsolete, and (C) the text is not a valid primary owner.
  """
  is_email = re.match(_EMAIL_PATTERN, owner_tag_text)
  is_placeholder = owner_tag_text == extract_histograms.OWNER_PLACEHOLDER
  should_check_owner_email = (is_first_owner and not is_obsolete
                              and not is_placeholder)

  if should_check_owner_email and not _IsValidPrimaryOwnerEmail(owner_tag_text):
    raise Error(
        'The histogram {} must have a valid primary owner, i.e. a Googler '
        'with an @google.com or @chromium.org email address. Please '
        'manually update the histogram with a valid primary owner.'.format(
            histogram_name))

  return is_email or is_placeholder
Returns true if owner_tag_text is an email or the placeholder text.

  Also, for histograms that are not obsolete, verifies that a histogram's first
  owner tag contains a valid primary owner.

  Args:
    is_first_owner: True if a histogram's first owner tag is being checked.
    owner_tag_text: The text of the owner tag being checked, e.g.
      'julie@google.com' or 'src/ios/net/cookies/OWNERS'.
    histogram_name: The string name of the histogram.
    is_obsolete: True if the histogram is obsolete.

  Raises:
    Error: Raised if (A) the text is from the first owner tag, (B) the histogram
    is not obsolete, and (C) the text is not a valid primary owner.
  
Returns true if owner_tag_text is an email or the placeholder text.
Also, for histograms that are not obsolete, verifies that a histogram's first
owner tag contains a valid primary owner.

True if a histogram's first owner tag is being checked.
owner_tag_text: The text of the owner tag being checked, e.g.

Raised if (A) the text is from the first owner tag, (B) the histogram
is not obsolete, and (C) the text is not a valid primary owner.
Returns true if owner_tag_text is an email or the placeholder text . Also for histograms that are not obsolete verifies that a histogram ' s first owner tag contains a valid primary owner . True if a histogram ' s first owner tag is being checked . owner_tag_text : The text of the owner tag being checked e . g . Raised if ( A ) the text is from the first owner tag ( B ) the histogram is not obsolete and ( C ) the text is not a valid primary owner .
def _IsEmailOrPlaceholder(is_first_owner, owner_tag_text, histogram_name,
                          is_obsolete):
  is_email = re.match(_EMAIL_PATTERN, owner_tag_text)
  is_placeholder = owner_tag_text == extract_histograms.OWNER_PLACEHOLDER
  should_check_owner_email = (is_first_owner and not is_obsolete
                              and not is_placeholder)
  if should_check_owner_email and not _IsValidPrimaryOwnerEmail(owner_tag_text):
    raise Error(
        'The histogram {} must have a valid primary owner, i.e. a Googler '
        'with an @google.com or @chromium.org email address. Please '
        'manually update the histogram with a valid primary owner.'.format(
            histogram_name))
  return is_email or is_placeholder
def _IsEmailOrPlaceholder ( is_first_owner , owner_tag_text , histogram_name , is_obsolete ) : is_email = re . match ( _EMAIL_PATTERN , owner_tag_text ) is_placeholder = owner_tag_text == extract_histograms . OWNER_PLACEHOLDER should_check_owner_email = ( is_first_owner and not is_obsolete and not is_placeholder ) if should_check_owner_email and not _IsValidPrimaryOwnerEmail ( owner_tag_text ) : raise Error ( 'The histogram {} must have a valid primary owner, i.e. a Googler ' 'with an @google.com or @chromium.org email address. Please ' 'manually update the histogram with a valid primary owner.' . format ( histogram_name ) ) return is_email or is_placeholder
Returns true if owner_tag_text is an email or the placeholder text.
Returns true if owner_tag_text is an email or the placeholder text .
"""Returns true if owner_tag_text is an email or the placeholder text.

  Also, for histograms that are not obsolete, verifies that a histogram's first
  owner tag contains a valid primary owner.

  Args:
    is_first_owner: True if a histogram's first owner tag is being checked.
    owner_tag_text: The text of the owner tag being checked, e.g.
      'julie@google.com' or 'src/ios/net/cookies/OWNERS'.
    histogram_name: The string name of the histogram.
    is_obsolete: True if the histogram is obsolete.

  Raises:
    Error: Raised if (A) the text is from the first owner tag, (B) the histogram
    is not obsolete, and (C) the text is not a valid primary owner.
  """
is_first_owner
owner_tag_text
histogram_name
is_obsolete