<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_index(self, name, value):
 """Changes the definition of a KV Store index. :param name: name of index to change :type name: ``string`` :param value: new index definition :type value: ``dict`` or ``string`` :return: Result of POST request """

        kwargs = {}
        kwargs['index.' + name] = value if isinstance(value, basestring) else json.dumps(value)
        return self.post(**kwargs)