def Nibblize(data, add_checksum=True):
  """Converts a byte string into a nibble string. Also adds checksum"""
  output = []
  if add_checksum:
    tail = [chr(sum(ord(char) for char in data) % 256)]
  else:
    tail = []
  for char in map(ord, list(data) + tail):
    output.append(chr(char >> 4))
    output.append(chr(char & 0x0f))
  return ''.join(output)