code: def _bytes_to_str(lines):
      
      if len(lines) >= 1 and hasattr(lines[0], 'decode'):
          return [line.decode('utf-8') for line in lines]
      else:
          return lines
docs: Convert all lines from byte string to unicode string, if necessary