def METHOD_NAME():
    assert util.to_bytestring('test_str', 'ascii') == b'test_str'
    assert util.to_bytestring('test_str®') == b'test_str\xc2\xae'
    assert util.to_bytestring(b'byte_test_str') == b'byte_test_str'
    with pytest.raises(TypeError) as exc_info:
        util.to_bytestring(100)
    msg = '100 is not a string'
    assert msg in str(exc_info.value)