def METHOD_NAME(self):
    """
    Check whether ps addresses changed.
    There are at least two kinds: 1) the num of ps
    addresses changed, 2) single ps address varies.
    """
    changed = False
    changed_type = None
    curr_address, ps_failure = self._failover_client.get_training_ps_addr()
    if "".join(curr_address) != "".join(self.curr_ps_address):
        if len(curr_address) != len(self.curr_ps_address):
            changed_type = "scaling"
        else:
            changed_type = "migrating"
        logger.info(
            "ps address changed from {} to {}.".format(
                self.curr_ps_address, curr_address
            )
        )
        if ps_failure is True:
            changed_type = "ps_failure"
            logger.warning(
                "ps failure happens, worker pod is going to exit"
            )
        self.curr_ps_address = curr_address
        changed = True
    return changed, changed_type