def ipopo_state_to_str(state):
    """
    Converts the state of a component instance to its string representation

    :param state: The state of an iPOPO component
    :return: A string representation of the state
    """
    ipopo_states = {
        0: "INVALID",
        1: "VALID",
        2: "KILLED",
        3: "VALIDATING",
        4: "ERRONEOUS",
    }

    return ipopo_states.get(state, "Unknown state ({0})".format(state))