def CollapseAddrListRecursive(addresses):
  ret_array = []
  optimized = False

  for cur_addr in addresses:
    if not ret_array:
      ret_array.append(cur_addr)
      continue
    if ret_array[-1].Contains(cur_addr):
      # save the comment from the subsumed address
      ret_array[-1].AddComment(cur_addr.text)
      optimized = True
    elif cur_addr == ret_array[-1].Supernet().Subnet()[1]:
      ret_array.append(ret_array.pop().Supernet())
      # save the text from the subsumed address
      ret_array[-1].AddComment(cur_addr.text)
      optimized = True
    else:
      ret_array.append(cur_addr)

  if optimized:
    return CollapseAddrListRecursive(ret_array)
  return ret_array
Send the user confirmation email.
dataset/ETHPy150Open google/capirca/lib/nacaddr.py/CollapseAddrListRecursive--crossover with--dataset/ETHPy150Open mozilla/kitsune/kitsune/users/models.py/RegistrationManager.send_confirmation_email