def get_next_az(self, environment, server_type):
        available_azs = self.list_availability_zones()
        try:
            newest_instance_az = self.list_instances_by_type(
                environment,
                server_type)[-1].extra['gonzo_az']
        except __HOLE__:
            return available_azs[0]

        if len(available_azs) == 1:
            return available_azs[0]
        else:
            for index, availabie_az in enumerate(available_azs):
                if availabie_az.name == newest_instance_az:
                    if (index + 1) == len(available_azs):
                        return available_azs[0]
                    else:
                        return available_azs[index + 1]
dataset/ETHPy150Open onefinestay/gonzo/gonzo/clouds/compute.py/Cloud.get_next_az