def get_key_state(self, status, state_dict):
        """Returns the key associated with the dict. """
        for key, val in state_dict.items():
            if val == status:
                return key