<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ensureiterable(value, iterable=list, exclude=None):
 """Convert a value into an iterable if it is not. :param object value: object to convert :param type iterable: iterable type to apply (default: list) :param type/tuple exclude: types to not convert :Example: [] () ['test'] ['t', 'e', 's', 't'] """


    result = value

    if not isiterable(value, exclude=exclude):
        result = [value]
        result = iterable(result)

    else:
        result = iterable(value)

    return result