def get_all_ips(self, ips_layout):
    """ Searches through the given IPs layout and finds all the unique IP
    addresses.

    Args:
      ips_layout: A dict that maps AppScale roles to either an IP address or a
        list of IP addresses that host that role.
    Returns:
      A list containing all of the IP addresses in the IPs layout, without
        duplicates.
    """
    all_ips = []
    for _, ip_or_ips in ips_layout.items():
      if isinstance(ip_or_ips, str):
        if not ip_or_ips in all_ips:
          all_ips.append(ip_or_ips)
      elif isinstance(ip_or_ips, list):
        for ip in ip_or_ips:
          if not ip in all_ips:
            all_ips.append(ip)

    return all_ips
dataset/ETHPy150Open AppScale/appscale-tools/lib/appscale.py/AppScale.get_all_ips/original