def decode_to_string(toDecode):
    try:
        return toDecode.decode('utf-8')
    except AttributeError: # bytesToDecode was of type string before
        return toDecode
This function is needed for Python 3,
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/util.py/decode_to_string