code: def decode_index_value(self, index, value):
          
          if index.endswith("_int"):
              return int(value)
          else:
              return bytes_to_str(value)
docs: Decodes a secondary index value into the correct Python type.
          :param index: the name of the index
          :type index: str
          :param value: the value of the index entry
          :type  value: str
          :rtype str or int