def CanonicalizeAddress(addr):
  """Strip angle brackes from email address iff not an empty address ("<>").

  Args:
    addr: the email address to canonicalize (strip angle brackets from).

  Returns:
    The addr with leading and trailing angle brackets removed unless
    the address is "<>" (in which case the string is returned unchanged).
  """
  if addr == '<>': return addr
  return addr.lstrip('<').rstrip('>')