<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prep_stream_data(data):
 """Take an input and prepare it for use as a stream. :param data: Input data :returns: Prepared stream :rtype: InsistentReaderBytesIO """

    if isinstance(data, (six.string_types, six.binary_type)):
        stream = io.BytesIO(to_bytes(data))
    else:
        stream = data

    return InsistentReaderBytesIO(stream)