docs: def read_string(source, offset, length):
      """Reads a string from a byte string.
  
      :param bytes source: Source byte string
      :param int offset: Point in byte string to start reading
      :param int length: Length of string to read
      :returns: Read string and offset at point after read data
      :rtype: tuple of str and int
      :raises SerializationError: if unable to unpack
      """
      end = offset + length
      try:
          return (codecs.decode(source[offset:end], aws_encryption_sdk.internal.defaults.ENCODING), end)
      except Exception:
          raise SerializationError("Bad format of serialized context.")