def to_string(comp_type):
    '''Returns the correct string for a given composite type.

    @raises InvalidCompositeTypeError

    '''
    if comp_type == NONE:
        return NONE
    elif comp_type== PERIODIC_EC_SHARED:
        return PERIODC_EC_SHARED
    elif comp_type == PERIODIC_STATE_SHARED:
        return PERIODIC_STATE_SHARED
    elif comp_type == GROUPING:
        return GROUPING
    elif comp_type == FSM_EC_SHARED:
        return FSM_EC_SHARED
    elif comp_type == FSM_STATE_SHARED:
        return FSM_STATE_SHARED
    else:
        raise InvalidCompositeTypeError(type_string)
Returns the correct string for a given composite type.

    @raises InvalidCompositeTypeError