def cast_unicode(s, encoding='utf8', errors='replace'):
        if isinstance(s, unicode):
            return s
        return str(s).decode(encoding)
Reads lines from the file_object, up to max_bytes bytes.
dataset/ETHPy150Open circus-tent/circus/circus/py3compat.py/cast_unicode--crossover with--dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/log_processing.py/FileSystem.readlines