def cast_bytes(s, encoding='utf8'):
        if isinstance(s, unicode):
            return s.encode(encoding)
        return str(s)
work out what DN they meant
dataset/ETHPy150Open circus-tent/circus/circus/py3compat.py/cast_bytes--crossover with--dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/netcmd/rodc.py/cmd_rodc_preload.get_dn