code: def _read_utf(cls, data, pos, kind=None):
          
          size = b2.unpack_from(data, pos)[0]
          pos += 2
          try:
              return data[pos:pos+size].decode('utf-8'), pos+size
          except (UnicodeEncodeError, UnicodeDecodeError) as e:
              raise BadKeystoreFormatException(("Failed to read %s, contains bad UTF-8 data: %s" % (kind, str(e))) if kind else \
                                               ("Encountered bad UTF-8 data: %s" % str(e)))
docs: :param kind: Optional; a human-friendly identifier for the kind of UTF-8 data we're loading (e.g. is it a keystore alias? an algorithm identifier? something else?).
                       Used to construct more informative exception messages when a decoding error occurs.