<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def increment(self, key, cache=None, amount=1):
 """Query the server to increment the value of the key by the specified amount. Negative amounts can be used to decrement. Keyword arguments: key -- the key the item is stored under. Required. cache -- the cache the item belongs to. Defaults to None, which uses self.name. If no name is set, raises a ValueError. amount -- the amount to increment the value by. Can be negative to decrement the value. Defaults to 1. """

        if cache is None:
            cache = self.name
        if cache is None:
            raise ValueError("Cache name must be set")
        cache = quote_plus(cache)
        key = quote_plus(key)

        body = json.dumps({"amount": amount})

        result = self.client.post("caches/%s/items/%s/increment" % (cache,
            key), body, {"Content-Type": "application/json"})
        result = result["body"]
        return Item(values=result, cache=cache, key=key)