def _get_master_estate_name(self, clustered=False):
        opts = self.opts.value
        master = self.road_stack.value.nameRemotes.get(self.master_estate_name.value)
        if not master or not master.alived:  # select a different master
            available_masters = [remote for remote in
                                 six.Iterator(self.road_stack.value.remotes)
                                                       if remote.alived]
            if available_masters:
                random_master = opts.get('random_master')
                if random_master:
                    master = available_masters[random.randint(0, len(available_masters) - 1)]
                else:
                    master = available_masters[0]
            else:
                master = None

        self.master_estate_name.value = master.name if master else ''

        return self.master_estate_name.value
Assign and return the name of the estate for the default master or empty if none
dataset/ETHPy150Open saltstack/salt/salt/daemons/flo/core.py/SaltRaetRouter._get_master_estate_name