docs: def hexdump(src, length=8):
      """ Produce a string hexdump of src, for debug output."""
      if not src:
          return str(src)
      src = input_validate_str(src, 'src')
      offset = 0
      result = ''
      for this in group(src, length):
          hex_s = ' '.join(["%02x" % ord(x) for x in this])
          result += "%04X   %s\n" % (offset, hex_s)
          offset += length
      return result