def marshal_value(datatype, value):
    """
    Marshal a given string into a relevant Python type given the uPnP datatype.
    Assumes that the value has been pre-validated, so performs no checks.
    Returns a tuple pair of a boolean to say whether the value was marshalled and the (un)marshalled
    value.
    """
    for types, func in MARSHAL_FUNCTIONS:
        if datatype in types:
            return True, func(value)
    return False, value