import six


def io_bytesio(bytes_string):
    """
    Makes compatibility Py2/Py3
    :param bytes_string:
    :return:
    """
    if six.PY2:
        return bytes_string
    return bytes(bytes_string, 'utf8')