def key_to_str(key, max_len = 255):
    if isinstance(key, (bytearray, bytes)):
        return "<binary key>"
    s = str(key)
    if len(s) > max_len:
        return s[:max_len] + ' ...'
    else:
        return s
dataset/ETHPy150Open cimatosa/jobmanager/jobmanager/persistentData.py/key_to_str/original