def str_(data):
    """ Python 2 and 3 safe str(),
        for when Python 3 uses Bytes where Python 2 used Strings.
        Should be used anywhere you would use the str() function.
    """
    # Safer conversion from bytes to string for python 3.
    if isinstance(data, (bytes, bytearray)):
        return data.decode()
    return str(data)